technology and zen of life

“A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.”

Mounting VMware disks on the host system

VMware uses virtual disk files as a source to store data from their virtual machines. These files are have an extension of .vmdk and are stored on your local hard drive. There are multiple instances on some of the best web hosting agency´s where one would want to access these files without having to boot up the virtual machine. It could be due to a crashed VMware to recover files or like in my case to save time and speed up data retrieval from the VMware.

Luckily VMware has developed a tool for exactly these reasons, the VMware disk mount utility. You can download this utility from the following link for Windows http://www.vmware.com/download/eula/diskmount_ws_v55.html for Linux it normally comes as a part of the VMware workstation.

The installing part of the tool is pretty simple and straight forward.

To use it on windows:

If you want to mount the drive to say letter J use the following command:

vmware-mount J: “C:\My Virtual Machines\Windows98\Windows98.vmdk”

Of course replace the vmdk file path with the file you want to mount.

If you have multiple disks on the virtual machine you can use the /p option to list all the volumes and then you can select the specific volume to mount using the /v:[Volume number to mount]

e.g.

vmware-mount “C:\My Virtual Machines\Windows98\Windows98.vmdk” /p

vmware-mount J: “C:\My Virtual Machines\Windows98\Windows98.vmdk” /v:2

To list the currently mounted drives use the /L option

And finally use the /d option to unmount a drive. (Hint: you can use the /f option in case you want to force unmount a drive although highly not recommended)

For Linux users:

To mount a hard drive use

vmware-mount ~/vm/RHEL4.vmdk /mnt/rhel4

Where ~/vm/RHEL4.vmdk is the path to your virtual machine files and /mnt/rhel4 is the path where you want to mount the file to.

If you have multiple disks on the virtual machine or on you can use the -p option to list all the volumes and then you can select the specific volume to mount using the volume number after the source path

e.g.

vmware-mount  -p ~/vm/RHEL4.vmdk

vmware-mount ~/vm/RHEL4.vmdk 2 /mnt/rhel4

To list the currently mounted drives use the -L option

And finally use the -d option to unmount a drive. (Hint: you can use the –x or -X option in case you want to force unmount a drive although highly not recommended)

Leave a Reply

Email Subscription

Disclaimer

The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.
%d bloggers like this: