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 despite
the performance problems with it being written in Python? Something like:
$ tar tvf disk.ova
-rw-r--r-- rjones/rjones 2031616 2020-06-26 21:32 disk.qcow2
$ nbdkit -U - tar tar=disk.ova file=disk.qcow2 --run 'qemu-img info
--output=json $nbd'
{
"virtual-size": 105923072,
"filename": "nbd+unix://?socket=/tmp/nbdkitTjkeRd/socket",
"cluster-size": 65536,
"format": "qcow2",
"format-specific": {
"type": "qcow2",
"data": {
"compat": "1.1",
"lazy-refcounts": false,
"refcount-bits": 16,
"corrupt": false
}
},
"dirty-flag": false
}
qemu-img measure will work the same way.
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