[Libguestfs] [PATCH virt-v2v] v2v: -o rhv-upload: Enable multi-conn
nsoffer at redhat.com
Mon Aug 2 21:16:48 UTC 2021
On Mon, Aug 2, 2021 at 6:49 PM Richard W.M. Jones <rjones at redhat.com> wrote:
> On Mon, Aug 02, 2021 at 01:50:05PM +0100, Richard W.M. Jones wrote:
> > However it didn't appear to create multiple disks, unless it only
> > attached one and the others are hidden somehow. I'll PM you the admin
> > details for my RHV cluster so you can take a look.
> It turns out that it does create a new disk on every connection -- I
> can see it under the Storage tab -- so that's quite bad. I'll see if
> I can come up with a patch.
It shows that the code is robust, but not very useful :-)
I guess that the vm was created with the last disk id written
The issue is not only creating the disk, but creating an image transfer
per plugin open(). The wanted flow is:
1. precheck (vm already exists? etc.)
2. convert source disk
We need to know the size and required allocation of the disk
before creating the disk, for example for qcow2 disks on block
3. create disk
Note that the disk id can be an input to ovirt, there is no need
to depend on ovirt for generating the disk id, and pass it back
top the code creating the vm.
This step is slow (for no good reason), so it you have multiple
disks you may want to create them in parallel.
4. create image_transfer, keep transfer_url, proxy_url
5. run nbdkit with the rhv plugin and the transfer urls from step 4.
There is no need to create more than one connection to imageio
per plugin instance.
6. finalize image_transfer
7. create the vm using disk id generated for step 3
More information about the Libguestfs