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.
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, usevirt-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