Thursday, June 4, 2009

Installing VMWare tools under WMWare player

Normally, if you run a VM that was originally created with VMWare Workstation you can run this with VMWare player just as well. VMWare player is free as in free as in free beer and the idea is that you should be able to run VMs but just not be able to create them.

Fair enough, but with sites like EasyVMX you don't need a licensed VMWare Workstation. However, there's a catch:

VMWare tools are a set of utilities including drivers that will boost performance of your VM enormously. They're supposed to be run AFTER you've created your VM and installed your OS on it, and these do not come with VMWare player but only with VMWare Workstation.

So what to do? Of course you should purchase a VMWare Workstation license, but say you're only in it for creating on dang VM and that's all you ever need and you'll be fine forever with VMWare player?

Hmm, here's a way to do it (note, I have no idea if this is legal so before proceeding you should really check).

  • Get a trial licence of VMWare Workstation. It's free of charge, but you have to register.
  • Get it installed somewhere, preferably on another computer.
  • Search for all *.iso files in the directory of the above installation and copy them into a directory of it's own. Those are your VMWare tools for various host OS:es.
  • Copy that directory to your original mashine (or to each mashine you have VMWare player installed at), preferably where you store your VM's as a subdirectory called vmware_tools.
  • Then make the following change in your .vmx file:
#######################################################
## Settings for physical CDROM drive
#ide1:0.present = "TRUE"
#ide1:0.deviceType = "cdrom-raw"
#ide1:0.startConnected = "TRUE"
#ide1:0.fileName = "auto detect"
#ide1:0.autodetect = "TRUE"
#######################################################
# Settings for VMWare tools
ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-image"
ide1:0.startConnected = "TRUE"
ide1:0.fileName = "..\vmware_tools\windows.iso"
ide1:0.autodetect = "TRUE"
#######################################################

Note that which device (ide1:0) is mapped to your CD might differ. Adapt the abouve to your own fit.

Now start up your VM and you will notice that instead of CD drive, you have the windows.iso running instead. Click on it and you should get a wizard letting you install the VMWare tools.

When you're done, shut down your VM and restore the vmx file (or swap the sections with remarks with the section without in the snippet above). Start it up again and you'll have VMWare player running your VM at full speed.

Get VMWare player to support USB2.0

If you run say Windows XP as host OS under the free (as in free beer) VMWare player and you find yourself getting BSOD or notifications saying "this device can operate faster" when you attach a USB device to a USB port, then there's a good chance whoever created the VM didn't know how to configure it for VMWare player to use USB2.0. Note that it doesn't matter that your real HW does support USB2.0, VMWare historically didn't.

As of today's writing EasyVMX will not create VMs that will work with USB 2.0 properly.

In such case, make sure the following lines are in your .vmx file (you can edit it while the VM is not running):

virtualHW.version = "7"
usb.generic.autoconnect = "TRUE"
ehci.present = "TRUE"

Start up your VM again, wait for a minute or so until you get a message from Windows saying that something about "drivers have been updated" , and voilá - you have USB2.0 support.