[Libguestfs] [PATCH 2/5] v2v/lib/util.ml: Get disk allocation from input

Richard W.M. Jones rjones at redhat.com
Sun Dec 19 10:34:18 UTC 2021


On Sun, Dec 19, 2021 at 01:30:28AM +0200, Nir Soffer wrote:
> On Sun, Dec 19, 2021 at 12:40 AM Nir Soffer <nsoffer at redhat.com> wrote:
> >
> > It can be fixed in another way, maybe skipping the check when using
> > rhv-upload because it cannot provide the needed info.
> >
> > I'm not sure why this check is needed - RHV already has everything
> > it needs at this point, and it does not care about disk allocation after
> > the disk was uploaded. If RHV needs any info about the disk, it can
> > get it from storage.
> >
> > Maybe you add stuff to the ovf that RHV does need?

So looking at the commit (a2a4f7a09996) it seems as if it applies to
all OVF outputs (including -o rhv-upload), but I think we only
intended to add it to -o rhv output.

Normally we'd do that by checking if ovf_flavor = RHVExportStorageDomain.
So I think a fix is to make the actual_size stuff dependent on that test.

> I see that this code is not in rhel-9.0.0 branch, so this patch is not
> needed for https://bugzilla.redhat.com/2032324

It is in the latest rhel-9.0.0 branch.

> Laszlo, can you explain why we need the number of allocated bytes
> after the disk was already converted to the target storage?
> 
> Looking at the bug:
> https://bugzilla.redhat.com/2027598
> 
> This is a fix for the issue in the old rhv output, which is deprecated and
> should not be used in new code, and it is not compatible with rhv-upload
> which is the modern way to import into RHV.
> 
> Also this cannot work for RHV now, so we need a way to disable
> this when importing to RHV.

"RHV" here is confusing - I think you mean -o rhv-upload here?
(not -o rhv)

> We can expose the block status in RHV plugin, but to use this we must
> call block status after the disk is converted, but before the output
> is finalized, since when you finalize RHV disconnect the disk from
> the host, and the RHV plugin cannot access it any more.
> 
> The flow for rhv-upload should be:
> 
>     run nbdcopy
>     query block status
>     finalize output
>     create ovf

I suppose this won't be needed if we make the change above, but it was
Laszlo who investigated this issue in detail so let's see what he says.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list