[Libguestfs] [PATCH v3] appliance: extract UUID from QCOW2 disk image

Richard W.M. Jones rjones at redhat.com
Thu Aug 13 09:18:29 UTC 2020


On Thu, Aug 13, 2020 at 10:03:56AM +0100, Richard W.M. Jones wrote:
> On Thu, Aug 13, 2020 at 07:48:52AM +0300, Andrey Shinkevich wrote:
> > For the appliance of the QCOW2 format, the function get_root_uuid()
> > fails to get the UUID of the disk image.
> > In this case, let us read the first 256k bytes of the disk image  with
> > the 'qemu-img dd' command. Then pass the read block to the 'file'
> > command.
> > 
> > Suggested-by: Denis V. Lunev <den at openvz.org>
> > Signed-off-by: Andrey Shinkevich <andrey.shinkevich at virtuozzo.com>
> 
> Thanks, I pushed this with a few minor adjustments to error
> handling in the get_root_uuid function.

Or at least I thought I pushed the adjustments.  I force-pushed
the right commit just now.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list