[fedora-virt] Mount guest filesystems in the host

Richard W.M. Jones rjones at redhat.com
Tue Nov 3 20:17:30 UTC 2009


Little bit quiet on this list at the moment, so here's some news ...

We just built a package called 'libguestfs-mount' in Rawhide which
lets you mount virtual machines' filesystems on the host, using FUSE.

  http://koji.fedoraproject.org/koji/buildinfo?buildID=139621

Use it like this (as non-root):

  mkdir /tmp/mnt
  guestmount -a disk.img -m /dev/VG/Root --ro /tmp/mnt

where you can replace 'disk.img' with any guest's disk image, and
/dev/VG/Root with the root device in that guest.

Or to get virt-inspector to do the hard work of looking in the guest
and arranging the disks for you:

  guestmount $(virt-inspector --ro-fish MyGuest) /tmp/mnt

where MyGuest is the name of the guest (as known by libvirt).

And then you can just look into /tmp/mnt and browse the guest's disk
using whatever text or graphical tools you want.

To unmount do:

  fusermount -u /tmp/mnt

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the Fedora-virt mailing list