Using Ubuntu Dapper Drake, that is.
1) Install vmplayer. If you are using a precompiled kernel package, all you have to do is this:
# apt-get install vmware-player-kernel-modules-2.6.15-26 vmware-player
Make sure the kernel modules correspond to the exact version of the kernel you are using!
2) Get files ready
Create a directory for your VM and place the windows ISO inside (if you want to install from a CD, you do something else later on).
For the actual vmware-files, you can either download the files here [
win2kprovmwarefiles.tar.gz, 1.7kB] or create them by hand. To create the image file, run the following command:
$ qemu-img create -f vmdk win2kpro.vmdk 2G
You might have to install qemu if you don't have it yet:
# apt-get install qemu
Next, you need a vmx file. Create a file called win2kpro.vmx with the following content:
#!/usr/bin/vmware
config.version = "8"
virtualHW.version = "3"
ide0:0.present = "TRUE"
ide0:0.filename = "win2kpro.vmdk"
memsize = "64"
MemAllowAutoScaleDown = "FALSE"
# create a fake CD drive with the windows ISO
ide1:0.present = "TRUE"
ide1:0.fileName = "~/vmware/win2k/w2k.iso"
ide1:0.deviceType = "cdrom-image"
ide1:0.autodetect = "TRUE"
floppy0.present = "FALSE"
ethernet0.present = "TRUE"
usb.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "es1371"
displayName = "Windows 2000 Pro"
guestOS = "win2000pro"
nvram = "Windows2000Pro.nvram"
MemTrimRate = "-1"
ide0:0.redo = ""
ethernet0.addressType = "generated"
uuid.location = "56 4d ab 86 9b 9b d4 08-7b 74 25 cd 22 ce 7e d1"
uuid.bios = "56 4d ab 86 9b 9b d4 08-7b 74 25 cd 22 ce 7e d1"
ethernet0.generatedAddress = "00:0c:29:ce:7e:d1"
ethernet0.generatedAddressOffset = "0"
tools.syncTime = "TRUE"
ide1:0.startConnected = "TRUE"
uuid.action = "create"
checkpoint.vmState = "win2kpro.vmss"
tools.remindInstall = "FALSE"
usb.autoConnect.device0 = ""
This assumes that the windows ISO is called w2k.iso. If you want to install a different OS, make sure you modify the guestOS parameter accordingly. You probably also want to change the filenames to avoid confusion. If you're installing windows from a CD, ide1:0.deviceType needs to be set to cdrom-raw, fileName is 'auto detect'.
3) Install Windows
Now all you have to do is boot your VM. As the image is empty, it will boot from the CD device - which is, in this case, the windows ISO. You will get a regular Windows installation routine, as you do when installing Windows onto a computer (but with faster reboots).
4) Install VMtools
Trust me, you need this. I think the 100% legal way to do this is this: Get an evaluation version of the Workstation from vmware.com. Unpack it and get the file called windows.iso.
According to something I read on vmware.com (sorry, can't find it right now) it is legal to keep the file after the 30 days trial period is over, and it might be legal to just copy the file from someone who's already got it, but don't ask me about that.
Adjust the VMX file to point to the windows.iso instead of the installer ISO (just change the ide1:0.filename parameter)., start your VM and reboot it. When Windows has rebooted, autorun the CD; it should spawn a setup program to quickly install all the VM-tools. This includes a SVGA graphics driver, tools for network connections and a mouse driver that can automatically grab the input when the mouse is above the vmplayer windows (you don't have to click or press Ctrl+G anymore to grab input or Ctrl+Alt to release input).
That's it, happy virtual machining.
Thanks to
http://johnbokma.com/mexit/2005/10/26/vmware-player-windows-xp.html
and
http://www.hackaday.com/2005/10/24/how-to-vmware-player-modification/
for most of the instructions and to
ff for getting me started.
Known Issues:
VMWare for Linux seems to use OSS and can't access the sound device on my system if anything else is using the playback device. Just stopping playback and connecting the sound device works, though.
Performance:
I'm currently running a Pentium III 1GHz toshiba laptop, the performance isn't enough to do anything useful like playing windows games (even old ones).