Ubuntu 7.04 - Use Windows XP inside of Linux

Virtualization allows you to create a ‘virtual machine’, which is essentially an application that runs another operating system inside of your current operating system. There are several different virtualization solutions available, some of which include QEMU, Xen, VirtualBox, and VMWare. This post will detail how to set up Windows XP in VMWare.

VMWare sells virtualization products and also offers some tools at no cost. One of their no cost tools is called VMWare Server, which lets you build and run virtual machines. I personally prefer another one of their no cost tools called VMWare Player, which allows you to run an already created Virtual Machine.

I install VMWare Player from the repositories with this command:

$ sudo aptitude install vmware-player

I then create my own virtual machine from scratch. I use the website EasyVMX to create the virtual machine shell that I will then install Windows XP into. This virtual machine shell consists of two components - a configuration file (VMX), and a virtual hard disk (split into multiple files depending on the size). So, at EasyVMX, I create my virtual machine with the following settings:

- Virtual Machine Name: xp_pro (or xp_home)
- Select Guest OS - either XP Pro or XP Home, whichever you are going to install

Network Configuration
- Use the default settings

Disk Configuration
- Floppy Disk Drive - I leave this unchecked
- CDROM Drives - I check both of the options. Later, I comment out CDROM 2 until I actually want to use an ISO file as a CDROM

Hard Disk Drives
- I select 12GB and leave SCSI unchecked. I leave Disk #2 unchecked.

Sound and I/O-Ports Configuration
- Use all of the default settings

Click the ‘Create Virtual Machine’ button, and then save the zip file that it creates for you. Note that, even though I selected a 12GB hard drive, the output files come out to be about 7.4KB. The hard drive space doesn’t actually take up physical disk space until there are actually files there to occupy the space. You now have a virtual machine to install Windows XP onto.

Extract the zip file and then open up the .vmx file in your text editor. Find the following lines:

# Settings for the optional virtual CDROM, ISO-image
ide1:1.present = “TRUE”
ide1:1.fileName = “.iso”
ide1:1.deviceType = “cdrom-image”
ide1:1.mode = “persistent”
ide1:1.startConnected = “FALSE”

and comment that whole section out, so it looks like this:

# Settings for the optional virtual CDROM, ISO-image
#ide1:1.present = “TRUE”
#ide1:1.fileName = “.iso”
#ide1:1.deviceType = “cdrom-image”
#ide1:1.mode = “persistent”
#ide1:1.startConnected = “FALSE”

Save the file. Now we are ready to install Windows XP. Put your Windows XP CD in your CDROM drive, and then open the .vmx file with VMWare Player. The virtual machine will start its boot process, it will look just like a computer booting up with a BIOS post and everything else. As the BIOS is loading, click your mouse in the window and hit the ESC key to get to the boot options and tell it to boot from your CDROM. Note that if you want your cursor back, you have to press CTRL+ALT one time. The virtual machine should now be booting off of your CDROM and you can now install Windows XP the same way you would install it on a normal computer.

Once the installation is finished, you can zip up a copy of this virtual machine folder and re-extract it anytime you want to in order to return to this ’saved state’. So, once you install Windows XP once, you can save a backup copy of those files and should never have to reinstall it again. Instead you would just unzip a new copy.

One last consideration: VMWare Tools is an application that can be installed onto Windows XP inside of the virtual machine that makes the experience a whole lot nicer. For example, it improves the display resolution and also allows you to move your mouse in and out of Virtual Machine without having to click CTRL+ALT. VMWare Tools does not come with VMWare Player, however it does come with VMWare Server - one of their other free products. Here is how I get VMWare Tools set up in my virtual machine:

Download a copy of VMWare Server. Once it is downloaded, extract the files. The file that we want that contains VMWare Tools is in that directory in this folder path:

lib/isoimages/windows.iso

I have saved a copy of ‘windows.iso’ so that I have it whenever I need it. Now, we need to have our Windows XP virtual machine use this ISO file as a CDROM so that we can run the installer that the iso contains. Open your vmx file in a text editor again and find the section that we commented out previously:

# Settings for the optional virtual CDROM, ISO-image
#ide1:1.present = “TRUE”
#ide1:1.fileName = “.iso”
#ide1:1.deviceType = “cdrom-image”
#ide1:1.mode = “persistent”
#ide1:1.startConnected = “FALSE”

Uncomment the lines and change the fileName to match the path to where you have saved windows.iso:

# Settings for the optional virtual CDROM, ISO-image
ide1:1.present = “TRUE”
ide1:1.fileName = “/your/path/to/windows.iso
ide1:1.deviceType = “cdrom-image”
ide1:1.mode = “persistent”
ide1:1.startConnected = “FALSE”

Save the file and then open it with VMWare Player. You will now notice an extra CDROM button at the top of the window. You can click that to enable this second CDROM (which is actually windows.iso). Windows should detect the CDROM and will either auto-launch the VMWare Tools installer, or you can navigate to the cdrom in Windows Explorer and start the installation from there. Once the installation is complete, shut down the virtual machine and then open the vmx file in a text editor and comment out those lines again until the next time you need to use an ISO as a CDROM. I usually back up a copy of my virtual machine once I have VMWare Tools installed along with all of the Windows Updates, etc.

That’s it, you can now run Windows XP as an appliation inside of Ubuntu. If I ever run across an oddball task that I can’t figure out how to do in Ubuntu, I just open up my VMWare session and do the task in there. This has eliminated the need for me to have to run a dual boot with Windows on my computer.

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Ubunty?

Fixed, thanks :)

Leave a comment

(required)

(required)