I accidentally found a way to do this using qemu-nbd. It's
not tested, but something like this should work:
qemu-nbd disk.img -o <offset> -t
qemu-img create -f qcow2 -b nbd:localhost:10809 /tmp/overlay
# and then run libguestfs as normal on /tmp/overlay
This is read-only (because of the overlay). However at the moment I'm
adding direct nbd support to libguestfs, so once committed it will be
able to access nbd exports in write mode.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW