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: Kevin Wolf
Subject: Re: Exporting qcow2 images as raw data from ova file with qemu-nbd
Date: Mon, 29 Jun 2020 10:54:12 +0200

Am 26.06.2020 um 20:47 hat Nir Soffer geschrieben:
> On Tue, Jun 23, 2020 at 1:47 PM Richard W.M. Jones <rjones@redhat.com> wrote:
> >
> > On Tue, Jun 23, 2020 at 01:14:43PM +0300, Nir Soffer wrote:
> > > On Tue, Jun 23, 2020 at 12:47 PM Richard W.M. Jones <rjones@redhat.com> 
> > > wrote:
> > > > Here you go:
> > > >
> > > > https://github.com/libguestfs/nbdkit/commit/2d15e79f65764d9b0c68bea28ed6afbcbcc63467
> > >
> > > Nice!
> > >
> > > But using qemu-nbd directly is much simpler and will perform better.
> >
> > Not sure about simpler,
> 
> These are the patches (in review) implementing this in imageio client:
> 
> - https://gerrit.ovirt.org/c/109847
> - https://gerrit.ovirt.org/c/109848
> 
> And this is example script for the engine SDK:
> https://gerrit.ovirt.org/c/109873/
> 
> Work is not finished yet, we need to handle getting image virtual size
> and measuring
> required size to support upload to sparse disks on block storage:
> https://bugzilla.redhat.com/show_bug.cgi?id=1849981#c3
> 
> Since we already run qemu-nbd to access images, this is just a
> modification of the
> 'json:{...}' filename, so we can also consume images inside tar file.
> 
> And in the client, allow specifying image format and tar member name
> (like the tar plugin).
> 
> Using tar plugin requires:
> - Adding support for NBD url - this is planned but at least the same
> amount of work as supporting
>   json: with qcow2 drive over raw with range.
> - Integrating with nbdkit and qemu-nbd (since we must have qcow2 support)
> - packaging
> - handle missing dependencies
> 
> Whats's missing in the current solution is supporting compressed raw
> disk. I don't think
> oVirt creates such ova files, so this should not be an issue. However
> if nbdkit tar
> plugin can support this (current implementation does not), this will
> be a good reason
> to integrate with it.
> 
> In this case we will have:
> 
>     [ovf | gziped raw image | ...]  -> nbdkit exposing uncompressed
> raw image -> imageio nbd client
> 
> I wonder if it is possible to  add gzip driver in qemu block layer?

gzip isn't block based, so if the file format isn't more complex than
simply gzipping the whole raw image at once, I think you can only read
things sequentially. This isn't a good fit for the QEMU block layer
which is based on random access operations.

Kevin




reply via email to

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