Mount VMware disk images (vmdk) on Linux

vmware_compThere is a trivial way to mount vmware disk images (*.vmdk files) from the GUI using VM settings. However, to do that remotely from the cmdline, VMware provides a specific tool vmware-mount which can be used as a regular user. Usage:

  1. Create the directory to mount the virtual disk:
    $ mkdir vmmnt
  2. Mount the virtual disk:
    $ vmware-mount myVM/myVM.vmdk vmmnt/
  3. Now any changes you make under vmmnt directory will be saved when you unmount:
    $ vmware-mount -k myVM/myVM.vmd

To mount vdi files on Ubuntu, download the right virtualbox-fuse package for your release and architecture from Launchpad. Then run:

//Install
$ sudo dpkg -i --force-depends virtualbox-fuse_$version_$arch.deb
//Mount vdi and volume
$ mkdir ~/vdisk
$ mkdir ~/vol1
$ sudo vdfuse -f Machine.vdi ~/vdisk
$ sudo mount ~/vdisk/Partition1 ~/vol1

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s