Re: [Qemu-discuss] Converting qcow2 image on the fly to raw format

2018-07-09 Thread Richard W.M. Jones
On Mon, Jul 09, 2018 at 07:02:50PM +0200, Kevin Wolf wrote: > Am 09.07.2018 um 18:52 hat Richard W.M. Jones geschrieben: > > On Mon, Jul 09, 2018 at 07:38:05PM +0300, Nir Soffer wrote: > > > We are discussing importing VM images to KubVirt. The goal is to be > > > able

Re: [Qemu-discuss] Converting qcow2 image on the fly to raw format

2018-07-09 Thread Richard W.M. Jones
On Mon, Jul 09, 2018 at 07:38:05PM +0300, Nir Soffer wrote: > We are discussing importing VM images to KubVirt. The goal is to be > able to import an existing qcow2 disk, probably some appliance stored > on http server, and and convert it to raw format for writing to storage. > > This can be also

Re: [Qemu-discuss] Converting qcow2 image on the fly to raw format

2018-07-09 Thread Richard W.M. Jones
On Mon, Jul 09, 2018 at 05:52:42PM +0100, Richard W.M. Jones wrote: > On Mon, Jul 09, 2018 at 07:38:05PM +0300, Nir Soffer wrote: > > We are discussing importing VM images to KubVirt. The goal is to be > > able to import an existing qcow2 disk, probably some appliance stored >

Re: [Qemu-discuss] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
On Thu, Jul 19, 2018 at 04:25:28PM +0300, Nir Soffer wrote: > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > wrote: > > > On Wed, Jul 11, 2018 at 02:17:18PM +0300, Adam Litke wrote: > > > Adding some kubevirt developers to the thread. Thanks guys for the > > > information! I think this c

Re: [Qemu-discuss] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
On Thu, Jul 19, 2018 at 09:50:00PM +0300, Nir Soffer wrote: > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > wrote: > ... > > > Recommendation is to run 'qemu-img info' to extract the metadata and sanity > > check results eg no backing file list, not unreasonable size, etc. When > > runnin

Re: [Qemu-discuss] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
This is the code in libguestfs if you prefer something in C: https://github.com/libguestfs/libguestfs/blob/3a87c4bb441430c9cef9223e67d10bf51a4e865c/lib/info.c#L150-L160 https://github.com/libguestfs/libguestfs/blob/3a87c4bb441430c9cef9223e67d10bf51a4e865c/lib/command.c#L585-L600 Rich. -- Ric

Re: [Qemu-discuss] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
I did the original work using AFL to fuzz qemu-img and find problematic images. From that work Dan & I suggested some fairly low limits (10 seconds IIRC). See: https://bugs.launchpad.net/qemu/+bug/1462944 https://bugs.launchpad.net/qemu/+bug/1462949 A lot more problematic images were found (at

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': 455168,

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 machine

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

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: > NbdkitMe

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 get

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 des

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! &

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 not),

Interesting qemu/virt-manager bug about the "rotational" attribute on virtio-blk disks

2020-07-16 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=1857515 A virtio-blk disk which is backed by a raw file on an SSD, inside the guest shows rotational = 1. I assumed that qemu must have a "rotational" property for disks and this would be communicated by virtio to the guest, but qemu and virtio don't

Re: Interesting qemu/virt-manager bug about the "rotational" attribute on virtio-blk disks

2020-07-17 Thread Richard W.M. Jones
On Thu, Jul 16, 2020 at 05:07:55PM -0700, Dongli Zhang wrote: > According to below commit, the virtio-blk used to be non-rot but it > (QUEUE_FLAG_NONROT/QUEUE_FLAG_VIRT) was removed due to some reason. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8b12e513b953a

Re: [ovirt-devel] [ARM64] Possiblity to support oVirt on ARM64

2020-07-22 Thread Richard W.M. Jones
On Wed, Jul 22, 2020 at 04:29:15PM +0800, Zhenyu Zheng wrote: > Hi, > > Any other comments for this topic? libguestfs, nbdkit and virt-v2v have also worked (upstream) for years out of the box on aarch64, so there should be no problem there. If you're interested in RHV (ie. oVirt downstream on RH

Re: Interesting qemu/virt-manager bug about the "rotational" attribute on virtio-blk disks

2020-07-23 Thread Richard W.M. Jones
On Thu, Jul 23, 2020 at 11:32:39AM +0100, Stefan Hajnoczi wrote: > On Thu, Jul 16, 2020 at 11:33:44AM +0200, Stefano Garzarella wrote: > > +Cc Michael, Stefan, virtualizat...@lists.linux-foundation.org > > > > On Thu, Jul 16, 2020 at 09:06:14AM +0100, Richard W.M. Jones wrot

What does qemu-img convert -W documentation mean?

2021-05-26 Thread Richard W.M. Jones
Firstly there's a real interesting thread about nbdcopy vs qemu-img convert performance: https://listman.redhat.com/archives/libguestfs/2021-May/thread.html#00119 I have a question about qemu-img convert -W flag. The documentation says: -W Allow out-of-order writes to the destination. This o

Re: What does qemu-img convert -W documentation mean?

2021-05-26 Thread Richard W.M. Jones
On Wed, May 26, 2021 at 04:01:01PM +0200, Jakob Bohm wrote: > On 2021-05-26 15:40, Richard W.M. Jones wrote: > >Firstly there's a real interesting thread about nbdcopy vs qemu-img > >convert performance: > >https://listman.redhat.com/archives/libguestfs/2021-May/thread.