On Tue, Sep 01, 2020 at 08:38:32PM +0100, Richard W.M. Jones wrote:
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.
I had a look at this and you're right:
qemu-img: Could not open '/var/tmp/fedora-32-sda': Image is not in qcow2 format
but maybe if people use block devices they should have to format them
if they want to use qcow2?
One reason is that they would get control over the qcow2 parameters
like cluster size, which would be hard to do if we had to pass them
all through virt-v2v. (Currently virt-v2v can only set qcow2
compression.)
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