Example — mount my Debian guest on my host Fedora server, using FUSE support which we added to libguestfs today:
$ mkdir /tmp/rich $ guestmount $(virt-inspector --ro-fish /dev/vg_trick/Debian5x64) /tmp/rich $ cat /tmp/rich/etc/debian_version squeeze/sid $ cat /tmp/rich/etc/hostname debian5x64 $ ls -l /tmp/rich/etc/apt/ total 19 -rw-r--r-- 1 root root 51 2009-05-14 18:07 apt.conf drwxr-xr-x 2 root root 1024 2009-08-13 18:10 apt.conf.d drwxr-xr-x 2 root root 1024 2009-08-06 14:42 preferences.d -rw------- 1 root root 0 2009-05-14 18:04 secring.gpg -rw-r--r-- 1 root root 669 2009-05-24 12:02 sources.list -rw-r--r-- 1 root root 0 2009-05-14 18:04 sources.list~ drwxr-xr-x 2 root root 1024 2009-02-07 21:18 sources.list.d -rw------- 1 root root 1200 2009-05-14 18:04 trustdb.gpg -rw------- 1 root root 5801 2009-05-14 18:04 trusted.gpg -rw------- 1 root root 5801 2009-05-14 18:04 trusted.gpg~ $ nautilus /tmp/rich/home/rjones/d/libguestfs/
As you can see we can browse the Debian guest with nautilus. That’s actually a git checkout of the libguestfs source that we use to verify the build on Debian:
Pingback: guestmount and virt-inspector « Richard WM Jones
Pingback: GLLUG talk on libguestfs (18th March 2010) « Richard WM Jones