[Libguestfs] guestmount without fstab

Richard W.M. Jones rjones at redhat.com
Tue Feb 23 15:21:17 UTC 2016


[A question about whether it is possible to use guestmount on a guest
which does not have /etc/fstab.  I've no reproduced this because I'm
CC-ing my reply to a public mailing list]

It's definitely possible.  I would suggest first using

  $ virt-filesystems -a disk.img --all --long -h

to get an idea of what's inside your disk image, then you
use a command such as:

  $ guestmount -a disk.img -m /dev/sda1 /tmp/mnt

As for the particular question about lack of /etc/fstab.  Are you
getting some kind of error when using the guestmount -i option?  It
used to be (a long time ago) that libguestfs inspection[1] could not
handle guests that did not have /etc/fstab, but that should be fixed
in recent versions.

If you mean, something which isn't a virtual machine disk image, then
of course libguestfs can handle these.  See reference [2].

Rich.

[1] http://libguestfs.org/guestfs.3.html#inspection

[2] http://libguestfs.org/guestfs-faq.1.html#whats-the-deal-with-guestfish--i

-- 
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