$ LIBGUESTFS_PATH=appliance ./fish/guestfish
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type: 'help' for help with commands
'quit' to quit the shell
><fs> add /tmp/test.img
><fs> run
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
><fs> vfs-type /dev/vda1
ext3
><fs> mount /dev/vda1 /
><fs> ll /
total 13
drwxr-xr-x 3 root root 1024 Mar 21 21:45 .
dr-xr-xr-x 19 root root 0 Mar 21 17:20 ..
drwx------ 2 root root 12288 Mar 21 21:45 lost+found
><fs> touch /hello
><fs> ll /
total 13
drwxr-xr-x 3 root root 1024 Mar 21 22:02 .
dr-xr-xr-x 19 root root 0 Mar 21 17:20 ..
-rw-r--r-- 1 root root 0 Mar 21 22:02 hello
drwx------ 2 root root 12288 Mar 21 21:45 lost+found
><fs> !uname -a
Darwin koneko.home.annexia.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
We used porting plan 3 from here, in this case running a Fedora appliance. A curious side-effect of this is that libguestfs on Mac OS X can read ext3 partitions and LVM, something which OS X itself wouldn’t normally be able to do. On the downside, it’s kind of slow, because qemu is not accelerated on OS X.
Interested people should look at the lengthy series of patches posted on the mailing list.
