On Thu, Dec 08, 2011 at 04:49:08PM +0000, Pádraig Brady wrote:
# guestmount --rw -a /tmp/disk -i /tmp/tmplFlBCc libguestfs: error: mount_options: mount_options_stub: /dev/root: No such file or directory
This image works OK with libguestfs 1.14/1.15. I suspect the commit you need to make it work is: commit 917f947590c92318fee2545ba88245d0de012e31 Author: Richard W.M. Jones <rjones@redhat.com> Date: Fri Sep 16 15:26:20 2011 +0100 inspection: Handle /dev/root in /etc/fstab. This means "the device that holds /etc/fstab", so map it correctly. This fixes support for ttylinux and also some other guests that use /dev/root instead of a real device name. The bigger issue here for OpenStack is how to recover gracefully when inspection fails. Even though guestmount -i doesn't work on the older libguestfs, you could still have used explicit -m option(s). You would have to know somehow which filesystem(s) are available and which you want to modify. That is information you can get from the API (g.list_filesystems) or using virt-filesystems. It's reasonable, if there is only one filesystem in the image, to just mount that one. What's less clear is what should happen if there are multiple filesystems: that information would have to be passed down from the user through OpenStack. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/