[Libguestfs] PATCH: Allow specifying the filesystem driver for guestmount

Richard W.M. Jones rjones at redhat.com
Thu May 9 07:49:36 UTC 2013


On Wed, May 08, 2013 at 10:01:26PM -0400, Dave Vasilevsky wrote:
> Currently guestfish has mount-vfs, and the libguestfs API has
> guestfs_mount_vfs(), but guestmount doesn't allow the user to specify
> a filesystem. This patch extends the --mount argument, so you can
> force an ext2 partition to mount as ext4:
> 
>   guestmount -a mydisk.img -m /dev/vda:/:defaults:ext4 mountpoint
> 
> You could also use it to choose between ntfs and ntfs-3g, or between
> hfsplus and the commercial ufsd. Finally, it could be useful if blkid
> misidentifies the filesystem.
> 
> GitHub compare doodad: https://github.com/vasi/libguestfs/compare/fuse-fstype
> Patch: https://github.com/vasi/libguestfs/compare/fuse-fstype.patch

ACK.  I'll push this later on today after I've done a few tests.

In answer to your other question about the incompatible protocol
between libguestfs 1.18 on the host and 1.21 in the appliance,
I realized why this was happening.  It's because of the changes that
were made in libguestfs 1.20 where we reimplemented various
calls to avoid protocol limits.  This means these calls are no longer
implemented in the daemon, but instead are emulated on the library
side.  The calls affected were:

guestfs_cat, guestfs_find, guestfs_read_file, guestfs_read_lines,
guestfs_write, guestfs_write_append, guestfs_lstatlist,
guestfs_lxattrlist, guestfs_readlinklist, guestfs_ls

Which means that these calls would break, whereas others would still
work fine.

In any case, I believe it'll be better for you to upgrade the host
side to at least libguestfs 1.20.

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://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list