[Libguestfs] [PATCH nbdkit] New filter: tar.

Richard W.M. Jones rjones at redhat.com
Thu Jul 9 11:05:39 UTC 2020


I have fixed this as far as I can and pushed it, but there are likely
still bugs, so please test it!

You can now do stuff like:

  $ nbdkit -f -v curl http://example.com/qcow2.tar.xz \
           --filter=tar --filter=xz tar-entry=disk.qcow2

Because the disk inside the tarball in this case is a qcow2 file, it
appears as qcow2 on the wire, so:

  $ guestfish --ro --format=qcow2 -a nbd://localhost

  Welcome to guestfish, the guest filesystem shell for
  editing virtual machine filesystems and disk images.

  Type: ‘help’ for help on commands
        ‘man’ to read the manual
        ‘quit’ to quit the shell

  ><fs> run
  ><fs> list-filesystems 
  /dev/sda1: ext2
  ><fs> mount /dev/sda1 /
  ><fs> ll /
  total 19
  drwxr-xr-x   3 root root  1024 Jul  6 20:03 .
  drwxr-xr-x  19 root root  4096 Jul  9 11:01 ..
  -rw-rw-r--.  1 1000 1000    11 Jul  6 20:03 hello.txt
  drwx------   2 root root 12288 Jul  6 20:03 lost+found

The (written in C) nbdkit-tar-plugin still exists.  I added a note to
the man page that we may remove this in nbdkit 1.26 which is a
comfortably long time in the future. But perhaps we won't remove it if
it still has advantages such as performance, more features or
stability?  We'll see.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list