[Libguestfs] "guestmount --rw" fails but "guestmount --ro" succeeds on Ubuntu 14.04

Richard W.M. Jones rjones at redhat.com
Thu Mar 3 10:53:34 UTC 2016

On Wed, Mar 02, 2016 at 04:13:20PM -0800, Vadaseri Vadaseri wrote:
> Thanks for your response Rich. Please see the output of --trace --verbose
> below.

The error is as I thought:

> qemu-system-x86_64: -drive
> file=agent-disk1.vmdk,cache=writeback,id=hd0,if=none: could not open disk
> image agent-disk1.vmdk: VMDK version 3 must be read only

> Regarding your suggestion to convert the vmdk to some other format,
> I do not want to do it. A security consultant said by modifying certain
> files in our VM and restarting the VM, one can gain access to encrypted
> data in our VM. I want to reproduce it. I am able to mount the VM but not
> able to modify files since it can be mounted with --ro option only.

You'll have to use one of the other methods I suggested in that case.

> > If you want to access a VMware ESX server, then you can use sshfs:
> >
> >
> > https://rwmj.wordpress.com/2011/05/10/tip-use-libguestfs-on-vmware-esx-guests/
> >
> > This should work for writes provided that the guest is shut down, and
> > because it uses VMware's own VMDK drivers it'll be a lot safer.
> >
> > Another way is to expose NBD from the VMware server or VMDK file
> > [using the proprietary VDDK library] and mount using
> > `-a nbd://example.com' (see guestfish manual for the -a option, which
> > guestmount also supports).


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.

More information about the Libguestfs mailing list