Monday, December 03, 2007

 

Virtualization Is Fun!!!!!

I was in the mood to learn about Virtualization and having a copy of 32-bit Vista running on a Gateway with a Pentium 4 at 3.00GHz and 3 gig of Ram available for the CPU to use, my adventure began.

The first attempt was using Virtual PC 2007 from Micro$oft. Unfortunately, Virtual PC 2007 does not enable USB for use, therefore that experiment ended quite rapidly.

The second attempt was using Virtualbox, www.virtualbox.org, this seemed to install well and communicated with the Internet well, unfortunately neither the sound nor USB was working. My sound goes through an Xitel HiFi-Link, www.xitel.com, and Virtualbox just could not seem to get the hang of what was going on. Very annoying!

My third attempt was VMware. Not wanting to shuck out $189.00 for VMware Workstation, www.vmware.com, my choice was to download a copy of VMware Player. Also since my intention was to build this Virtual implementation, the idea of downloading an appliances was not appealing, therefore after much Googling and trial and error(many many errors) my 32-bit Virtual XP Pro SP2 was up and running on my copy of Vista.

Sweet!!!!!

Yahoo widgets works, Softsqueeze works, Micro$oft Office 2003 works, all the updates to Windows XP Professional SP2 and Office 2003 work, my firewall and anti-virus work just as they do on my real XP, Thunderbird and Firefox install and update just as they do on my real XP, in short everything that has been tried has worked perfectly!!!

Very, very, very, very, cool!!!

Software required
32-bit Windows XP install CD or iso from the install CD. VMware Player. qemu-img.exe. VMwaretools.iso

The Method Used
Overview: Download needed files, install VMware Player, install Qemu for creating *.vmx file, *.vmdk file(s), install OS, install VMwaretools, run Virtual computer.

First: Download VMware Player, also vmwaretools.iso(You want the iso for Windows NOT an iso for Linux!!!! It will take a bit of Googling to find the correct iso, Good Luck!), and Qemu.
Use your copy of the Windows install CD or the iso of the install CD. What worked for me was to make an iso of my Windows XP Pro SP2 CD with UnDisker and have VMware Player boot the iso when the Virtual computer started for the first time.

Second: Install VMware Player. After installing the VMware Player you have to create a *.vmx file to guide VMware Player in starting up the Virtual computer. Later you will need to add the VMwaretools to the Virtual computer you have created. This is easiest to do if you have the Virtual computer booting with the VMwaretools.iso in the CD-ROM drive just as the install Windows CD was in the CD-ROM drive when the Virtual computer booted for the first time.

The WMware Player requires guidance provided by the *.vmx file as the Virtual computer starts booting in addition, you will need Virtual hard drive file(s) to store your windows installation on, *.vmd, and a place to store your data files. My choice was to create a C:\> drive file for booting my Virtual computer and a D:\> drive for storage purposes for my Virtual computer. VMplayer does not itself create files needed by the Virtual computer, however using Notepad you can create the *.vmx file used by VMware Player to start and run a Virtual computer. And by using Qemu-img you are able to create the hard drive file(s) needed.

Before or after creating the *.vmx file, you create the hard drive files using Qemu.
This is my *.vmx file created by Notepad (filename: WindowsXPPRO.vmx):

config.version = "8"

virtualHW.version = "3"


uuid.location = "56 4d 74 1b cb 8a f8 32-d2 95 9e aa 4a 14 12 e3"

uuid.bios = "56 4d 74 1b cb 8a f8 32-d2 95 9e aa 4a 14 12 e3"

uuid.action = "create"


checkpoint.vmState = "WindowsXPPRO.vmss"

displayName = "Windows XP Pro"

guestOS = "winxppro"

# Since my physical RAM is 4 gig, using 2 gig for the


# Virtual computer was no problem.


memsize = "2048"

MemTrimRate = "-1"


nvram = "WindowsXPPro.nvram"


usb.present = "TRUE"

ethernet0.present = "TRUE"


ethernet0.virtualDev = "vlance"

tools.syncTime = "TRUE"


tools.remindInstall = "FALSE"


isolation.tools.hgfs.disable = "FALSE"

isolation.tools.dnd.disable = "FALSE"


isolation.tools.copy.enable = "TRUE"


isolation.tools.paste.enabled = "TRUE"


usb.autoConnect.device0 = "path:1/2/0 autoclean:1"


usb.autoConnect.device1 = ""

# These lines mount the ide hard drive C:


ide0:0.present = "TRUE"


ide0:0.filename = "WindowsXPPro.vmdk"

ide0:0.deviceType = "disk"

ide0:0.mode = "persistent"


ide0:0.redo = ""

# These lines mount the ide hard drive D:


# The file containing the hard drive D: is on a real physical hard drive D:


# The file containing the Virtual Hard Drive D: is called GWVXPro.vmdk


# The file is located in the subdirectory \VMwareXProDiskDrive on physical D:

ide0:1.present = "TRUE"


ide0:1.fileName = "D:\VMwareXProDiskDrive\GWVXPro.vmdk"

ide0:1.mode = "persistent"
ide0:1.startConnected = "TRUE"

ide0:1.writeThrough = "TRUE"


# Use these lines to mount the iso of the Windows install CD


ide1:0.present = "TRUE"


ide1:0.fileName = "XPProSP2.iso"

ide1:0.deviceType = "cdrom-image"

ide1:0.autodetect = "TRUE"

# Use these lines to mount the physical CD for reading a real, physical CD-ROM


# ide1:0.present = "TRUE"


# ide1:0.fileName = "auto detect"


# ide1:0.deviceType = "cdrom-raw"

# ide1:0.autodetect = "TRUE"


# ide1:0.startConnected = "FALSE"

MemAllowAutoScaleDown = "FALSE"


ethernet0.connectionType = "bridged"


floppy0.present = "FALSE"


sound.present = "TRUE"


sound.virtualDev = "es1371"

ethernet0.addressType = "generated"


ethernet0.generatedAddress = "00:0c:29:14:12:e3"

ethernet0.generatedAddressOffset = "0"


extendedConfigFile = "WindowsXPPRO.vmxf"


virtualHW.productCompatibility = "hosted"


tools.upgrade.policy = "manual"


gui.exitOnCLIHLT = "TRUE"


fileSearchPath = "D:\VMwareXProDiskDrive;."

ide0:1.redo = ""


Third:
Install Qemu
After installing Qemu, make sure that the Qemu program subdirectory is on the Windows path!! (You could go to the subdirectory where Qemu was installed and run CMD from there.)

Fourth: Use qemu-img to create *.vmdk files. Since my Gateway has sufficient hard drive space on my C: drive for the boot drive of the Virtual XP Pro the qem-img was used to create a 10G boot file on the C: drive, BUT an 80G storage drive was placed on the D: drive in the VMwareXProDiskDrive subdirectory.

If you are going to follow my suggestion, create a subdirectory on C: drive called "VMWareWinXPPro". Then create a subdirectory on the D: drive called "VMwareXProDiskDrive".

Fifth: Open a CMD prompt and use the following two commands:

C:\>qemu-img.exe create -f vmdk C:\VMWareWinXPPro\WindowsXPPRO.vmdk 10G

C:\>qemu-img.exe create -f vmdk D:\VMwareXProDiskDrive\GWVXPro.vmdk 80G

After qemu-img.exe is finished proceed to the the sixth step.

Sixth: Place the WindowsXPPRO.vmx file into the C:\VMWareWinXPPro subdirectory. Put your Windows install CD into the CD-ROM drive or if you are using the iso make sure the WindowsXPPRO.vmx file lines point to the location of the iso file. When finished moving files, double click on the WindowsXPPRO.vmx file. WMware Player should start, boot the Windows install CD or the iso. You should see the standard install screen. Pick the WindowsXPPRO.vmdk file on the C:\> drive, for the install partition and install XP. After you get XP running, use the Compter Management tool to format the 80G storage drive on physical drive D: using GWVXPro.vmdk file. Shut down the Virtual computer just like a regular computer.

Seventh: Change the lines in the WindowsXPPRO.vmx file to point to the VMwaretools.iso that you found for Windows. In my case, the file was placed into the C:\VMWareWinXPPro subdirectory. After booting the Virtual computer, install the VMware tools, this will make your use of the Virtual XP much more enjoyable.

Eighth: Install your programs into the Virtual XP and enjoy!!

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?