qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exporting qcow2 images as raw data from ova file with qemu-nbd


From: Nir Soffer
Subject: Re: Exporting qcow2 images as raw data from ova file with qemu-nbd
Date: Fri, 26 Jun 2020 18:42:59 +0300

On Tue, Jun 23, 2020 at 5:08 PM Richard W.M. Jones <rjones@redhat.com> wrote:
>
> On Tue, Jun 23, 2020 at 08:47:52AM -0500, Eric Blake wrote:
> > On 6/22/20 5:21 PM, Nir Soffer wrote:
> > >And it works, but it exposes the qcow2 data. I want to raw data so I
> > >can upload the guest
> > >data to ovirt, where is may be converted to qcow2 format.
>
> Nir, can you use qemu-img convert and get a free conversion to your
> choice of format?  This works fine over NBD as long as you don't try
> and write which I guess you don't want to do here.

No, this code can run on remote host that does not have access to
storage, or on
a hypervisor as any user that cannot access storage.

> > >Richard suggested to try nbdkit tar plugin, but the plugin is not
> > >available on RHEL,
> > >and this adds additional dependency, when we already use qemu-nbd.
> >
> > Rich just rewrote the tar plugin to use python instead of perl,
> > which means it is that much easier for a future RHEL to pull it in.
> > We still ought to consider having a tar filter, either in place of
> > or in addition to, the tar plugin (similar to how we recently
> > converted nbdkit's ext4 support from a plugin to a filter) - having
> > a tar filter would allow you to read a compressed ova file (by
> > combining the xz and tar filters to decompress then extract a file).
> > But right now, nbdkit doesn't support non-C filters (and given that
> > our tar plugin was written first in perl and now in python, that
> > still means translation to yet another language if the filter
> > requires it to be in C).
>
> The reason it was in Perl and is now in Python (and not C), and also
> the reason it still a plugin, is that parsing tar files is very
> complex because of historical compatibility.  If we accept that we
> cannot write a from-scratch tar file parser in C then we have to use
> an existing tool or library (‘tar’ itself was used by Perl, now we're
> using ‘tarfile.py’ from Python stdlib).  Those tools require access to
> an actual local file.  So I'm afraid this rewrite is hard work :-)
>
> Unless we accept that we only parse files created by a narrow range of
> tools, but the problem is that OVA files can be generated by a wide
> variety of tools.
>
> If you can supply the offset by some other means then of course using
> nbdkit-offset-filter or qemu's offset block layer is the solution.
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-p2v converts physical machines to virtual machines.  Boot with a
> live CD or over the network (PXE) and turn machines into KVM guests.
> http://libguestfs.org/virt-v2v
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]