On Tue, Sep 01, 2020 at 10:08:24PM +0300, Nir Soffer wrote:
 > > I'm completely sure what the question means, but
virt-v2v currently
 > > does this:
 > >
 > >   qemu-img create -f FORMAT filename
 > >   qemu-img convert -n overlay filename
 
 This works, we also do this with file and block devices in most cases.
 
 I was confused by:
 
 > > > > +            (* It turns out that libguestfs's disk creation code
is
 > > > > +             * considerably more flexible and easier to use than
 > > > > +             * qemu-img, so create the disk explicitly using
libguestfs
 
 I guess you don't create qcow2 image without qemu-img?
 
 > > The new code doesn't change that for files, but the proposal does
 > > change it for devices to only this command:
 > >
 > >   qemu-img convert -n overlay device
 
 This does not work for qcow2, since -n disable creation of the image. 
I'm going to have to play with this.  It may be that we need
to drop -n when using devices.
Thanks,
Rich.
-- 
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