[Libguestfs] [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.

Richard W.M. Jones rjones at redhat.com
Sun Mar 11 22:09:33 UTC 2018


On Sun, Mar 11, 2018 at 10:54:14PM +0100, Tomáš Golembiovský wrote:
> Hi,
> 
> one more thing.
> 
> On Sun, 11 Mar 2018 13:17:47 +0100
> Tomáš Golembiovský <tgolembi at redhat.com> wrote:
> 
> > > +
> > > +def close(h):
> > > +    global params
> > > +
> > > +    http = h['http']
> > > +    connection = h['connection']
> > > +
> > > +    http.close()
> > > +
> > > +    # If we didn't fail, then finalize the transfer.
> > > +    if not h['failed']:
> > > +        disk = h['disk']
> > > +        transfer_service=h['transfer_service']
> > > +
> > > +        transfer_service.finalize()
> 
> You need to wait for the transfer to finish before proceeding. Otherwise
> there is a race between disk unlocking and VM creation. Last disk may
> not be attached to the VM producing the following error in engine.log:

Yes that explains why sometimes the disks are not attached to
the VM and sometimes they are.

Thanks,

Rich.

> > 2018-03-11 20:53:44,304+01 WARN [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-28) [d04925b] EVENT_ID: VM_IMPORT_FROM_CONFIGURATION_ATTACH_DISKS_FAILED(175), VM tg-mini has been imported from the given configuration but the following disk(s) failed to attach: 0ddc46a9-8989-47a0-ae2f-18201e44cf0d.
> 
> See this code:
> 
>     https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_ova_as_vm.py#L251
> 
> Once the transfer ceases to exist (the "pass") it is safe to continue.
> 
>     Tomas
> 
> -- 
> Tomáš Golembiovský <tgolembi at redhat.com>

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list