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: Richard W.M. Jones
Subject: Re: Exporting qcow2 images as raw data from ova file with qemu-nbd
Date: Tue, 23 Jun 2020 08:47:34 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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, 'size': 454144}]

I didn't know about this library, but it swings my thinking towards
making a Python-based version of the tar plugin.  This library is part
of python-libs and present in RHEL >= 7.

...
> 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.

I mean, nbdkit (with Python) is already in RHEL >= 7 and isn't going
away because we need it for virt-v2v, so a Python version of the tar
plugin seems like the easiest thing here.  I'll see how easy that is.

You wouldn't need to even wait for an upgrade, you could ship the
Python-based tar plugin yourself until it becomes a standard plugin
since it'll only be a few dozen lines of code.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




reply via email to

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