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

2020-06-29 Thread Kevin Wolf
Am 29.06.2020 um 15:08 hat Nir Soffer geschrieben: > On Mon, Jun 29, 2020 at 3:06 PM Kevin Wolf wrote: > > > > Am 26.06.2020 um 21:42 hat Nir Soffer geschrieben: > > > On Tue, Jun 23, 2020 at 1:21 AM Nir Soffer wrote: > > > > > > > > I'm trying to export qcow2 images from ova format using

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

2020-06-29 Thread Nir Soffer
On Mon, Jun 29, 2020 at 3:06 PM Kevin Wolf wrote: > > Am 26.06.2020 um 21:42 hat Nir Soffer geschrieben: > > On Tue, Jun 23, 2020 at 1:21 AM Nir Soffer wrote: > > > > > > I'm trying to export qcow2 images from ova format using qemu-nbd. > > > > > > I create 2 compressed qcow2 images, with

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

2020-06-29 Thread Kevin Wolf
Am 26.06.2020 um 21:42 hat Nir Soffer geschrieben: > On Tue, Jun 23, 2020 at 1:21 AM Nir Soffer wrote: > > > > I'm trying to export qcow2 images from ova format using qemu-nbd. > > > > I create 2 compressed qcow2 images, with different data: > > > > $ qemu-img info disk1.qcow2 > > image:

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

2020-06-29 Thread Richard W.M. Jones
On Fri, Jun 26, 2020 at 09:47:24PM +0300, Nir Soffer wrote: > 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

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

2020-06-29 Thread Kevin Wolf
Am 26.06.2020 um 20:47 hat Nir Soffer geschrieben: > On Tue, Jun 23, 2020 at 1:47 PM Richard W.M. Jones 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 > > > wrote: > > > > Here you go: > > > > > > > >

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

2020-06-28 Thread Richard W.M. Jones
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 wrote: > > > > > > Here you go: > > > > https://github.com/libguestfs/nbdkit/commit/2d15e79f65764d9b0c68bea28ed6afbcbcc63467 > > Nice! > > But using qemu-nbd directly is much

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

2020-06-26 Thread Nir Soffer
On Fri, Jun 26, 2020 at 11:34 PM Richard W.M. Jones wrote: > > On Fri, Jun 26, 2020 at 10:42:02PM +0300, Nir Soffer wrote: > > Can we have better support in qemu-img/qemu-nbd for accessing images > > in a tar file? > > > > Maybe something like: > > > > qemu-img info

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

2020-06-26 Thread Richard W.M. Jones
On Fri, Jun 26, 2020 at 10:42:02PM +0300, Nir Soffer wrote: > Can we have better support in qemu-img/qemu-nbd for accessing images > in a tar file? > > Maybe something like: > > qemu-img info tar://vm.ova?member=fedora-32.qcow2 Isn't this exactly a case where nbdkit-tar-plugin would work

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

2020-06-26 Thread Nir Soffer
On Tue, Jun 23, 2020 at 1:21 AM Nir Soffer wrote: > > I'm trying to export qcow2 images from ova format using qemu-nbd. > > I create 2 compressed qcow2 images, with different data: > > $ qemu-img info disk1.qcow2 > image: disk1.qcow2 > file format: qcow2 > virtual size: 200 MiB (209715200 bytes)

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

2020-06-26 Thread Nir Soffer
On Tue, Jun 23, 2020 at 1:47 PM Richard W.M. Jones 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 > > wrote: > > > Here you go: > > > > > >

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

2020-06-26 Thread Nir Soffer
On Tue, Jun 23, 2020 at 5:08 PM Richard W.M. Jones 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

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

2020-06-23 Thread Jakob Bohm
On 2020-06-23 16:08, Richard W.M. Jones 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.

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

2020-06-23 Thread Richard W.M. Jones
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

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

2020-06-23 Thread Eric Blake
On 6/22/20 5:21 PM, Nir Soffer wrote: I'm trying to export qcow2 images from ova format using qemu-nbd. I create 2 compressed qcow2 images, with different data: $ qemu-img info disk1.qcow2 image: disk1.qcow2 file format: qcow2 virtual size: 200 MiB (209715200 bytes) disk size: 384 KiB ... $

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

2020-06-23 Thread Richard W.M. Jones
On Tue, Jun 23, 2020 at 11:47:19AM +0100, Richard W.M. Jones wrote: > In theory yes, but it would require exposing the export name > (nbdkit_export_name() -> nbdkit.export_name()) to Python plugins, > which we don't do at the moment. See plugins/python/python.c: > NbdkitMethods[]. That would

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

2020-06-23 Thread Richard W.M. Jones
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 wrote: > > Here you go: > > > > https://github.com/libguestfs/nbdkit/commit/2d15e79f65764d9b0c68bea28ed6afbcbcc63467 > > Nice! > > But using qemu-nbd directly is much simpler and

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

2020-06-23 Thread Nir Soffer
On Tue, Jun 23, 2020 at 12:47 PM Richard W.M. Jones wrote: > > > Here you go: > > https://github.com/libguestfs/nbdkit/commit/2d15e79f65764d9b0c68bea28ed6afbcbcc63467 Nice! But using qemu-nbd directly is much simpler and will perform better. Regardless, nbdit tar plugin is awesome. Is it

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

2020-06-23 Thread Richard W.M. Jones
Here you go: https://github.com/libguestfs/nbdkit/commit/2d15e79f65764d9b0c68bea28ed6afbcbcc63467 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual

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

2020-06-23 Thread Richard W.M. Jones
On Tue, Jun 23, 2020 at 01:21:21AM +0300, Nir Soffer wrote: > $ python -c 'import tarfile; print(list({"name": m.name, "offset": > m.offset_data, "size": m.size} for m in tarfile.open("vm.ova")))' > [{'name': 'disk1.qcow2', 'offset': 512, 'size': 454144}, {'name': > 'disk2.qcow2', 'offset':

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

2020-06-23 Thread Nir Soffer
On Tue, Jun 23, 2020, 03:37 Jakob Bohm wrote: > Why not use qemu-img convert directly, it doesn't expose the disk > content to any > interface except the disk image file(s) created. > The context is uploading disks to a remote oVirt setup. You don't have access to the target image. > On

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

2020-06-22 Thread Jakob Bohm
Why not use qemu-img convert directly, it doesn't expose the disk content to any interface except the disk image file(s) created. On 2020-06-23 00:21, Nir Soffer wrote: I'm trying to export qcow2 images from ova format using qemu-nbd. I create 2 compressed qcow2 images, with different data:

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

2020-06-22 Thread Nir Soffer
I'm trying to export qcow2 images from ova format using qemu-nbd. I create 2 compressed qcow2 images, with different data: $ qemu-img info disk1.qcow2 image: disk1.qcow2 file format: qcow2 virtual size: 200 MiB (209715200 bytes) disk size: 384 KiB ... $ qemu-img info disk2.qcow2 image: