So, you have VMWare Player 4.x, installed on a Windows7 platform, and let's say you fancy recompiling FreeDOS in a virtualized environment. For this you have set up your VM, with a small virtual disk and everything, but since it's DOS, no shared folders or VMWare Tools will be available there. Yet you need a solution to exchange data in a convenient manner, between the Windows 7 host and the VM disk image. How are you going to do it then? Why, by mounting the vmdk as a virtual drive of course. And since VMWare is a Virtual hardware company, they made sure that such a staple of virtualization was as easy and as straightforward as possible, right?
Wrong. Below is what you actually need to go through:
- The VMWare Player does not natively offer any tools to map/mount a virtual drive. You have to install extra software.
- That software is the Virtual Disk Development Kit (presently in its version 5.5.1) which can be obtained here (after registration of course! It's not like you were about to sort this virtual disk mapping issue in 30 seconds anyway).
- Once installed (by running
bin\vstor2install.bat
), and of course without any obvious mention of it (since officially it's an SDK, not an application plugin!), you will find out that the following becomes available when editing your disk properties:
Brilliant: a GUI with the ability to map drives is exactly what we've been looking for. - Except, at least in Windows 7 x64, and if you run VMWare Player 4.x under your regular credentials, you will be greeted with the following error message "
Error reading volume information. Please select another disk file
":
Same occurs if you try the vmware-mount.exe from from the VDK's bin directory (and this even if you open a command prompt as admin, as I have also found) - To avoid the "
Error reading volume information...
" message then, and be able to mount the disk, you must run VMWare Player as admin - HOWEVER, "Open drive in Windows Explorer after mapping" still will not work, because Explorer is running under your user credentials, and the drive was mounted under the Administrator's credentials. Thus, you must run your File Explorer as administrative.
- Luckily, if you happen to run a proper File Manager (such as the most excellent Directory Opus, which I can't recommend enough as it's well worth its license), this isn't a major problem and you will actually get the friggin' vmdk mapped at long last, with the ability to transfer files. If you're stuck with the default Windows Explorer, running it as admin may or may not work —can't test, as on my machine, Directory Opus is the explorer that will be launched by default by VMWare)
Update (2012.01.06): The FreeDOS people kindly indicated that vmsmount might also be able to help you out if you want to acces VMWare shares from DOS.
You are a fucking genius (pardon the language). Took me 30 mins of googling and head banging but thanks your article, I was able to:
ReplyDelete1) map my virtual disk
2) Load an Acronis disk image
3) Boot from the virtual machine from the DVD
4) Restore that disk image
Thanks
Same shit in VMWare WS 9 when you don't see mapped drive from privileged command line.
ReplyDeleteLaunching WS as administrator fixed the problem.
Thanks!
I tried this still getting the same error
ReplyDelete(Excuse me if I'm submitting this multiple times. At least from here posting using a Google account seems to be broken.)
ReplyDeleteThis way doesn't seem to work very well on Windows 8.1 using VMware Workstation 11 or vmware-mount.exe from the VMware VDDK 5.1.4 (last version to contain vmware-mount). Mounting a disk as admin either way results in only processes launched with elevated privileges being able to see the drive. This isn't very practical since to use it in Explorer you have to pretty much kill off and restart your session with elevated privs.
I did find a workaround. You need a way to start a command prompt as TrustedInstaller, which basically has the highest privileges in an NT6 based system. The easiest way to get this is using the RunAsSystem and RunFromToken utilities from reboot.pro. Use vmware-mount.exe from a TrustedInstaller cmd and the mounted drive will work for all processes, including the lowly unprivileged Explorer you get by default.