I have a VMDK (with several partitions) file which I need to modify. It is not attached to any particular virtual machine.

I've tried using vmware-mount (from the VDDK toolset) in on Ubuntu server 12.04 which allows me to mount a particular partition from the VMDK to my local machine. I can successfully view the files and, after changing some permissions, I can write changes to the files.

The problem is that they don't persist after I unmount the vmdk (then remount it to check for the changes). Do I need to do anything before unmounting? I'm currently using vmware-mount -d to unmount after making my changes.

I haven't tried to convert the VMDK to a different format, make changes, then convert back. I'm skeptical about going that route.

  • What changes do you need to make to it?
    – ewwhite
    Jul 8, 2013 at 19:29
  • I just need to modify the contents of a text file
    – s g
    Jul 11, 2013 at 20:47

2 Answers 2


You should try guestfs. It supports VMDK format and allows you to change/download/upload content from/to your VMDK file. You can use subcommand virt-copy-in to upload content into a disk file, use virt-edit to edit file in an offline disk image.


What filesystem is on the vmdk if it's ext2/ext3 then add it to a vm (in persistent mode) find the /dev device for it and mount in linux in the normal way (using mount /mountpoint /dev/[device]) make your changes and then mount /mountpoint

  • I would like to do this without any VM's involved. Ideally, I could have a script that makes a simple modification to a bunch of VMDK files.
    – s g
    Jul 11, 2013 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.