Sunday, November 4, 2012

Virtual PC: Mounting a Windows 7 32-bit VM

The following is an overview of the Windows 7 Virtual Machine (VM) for Windows 7 Virtual PC creation process:
1. Download the AIK (MS Automated Installation Kit) with SP1.
2. Copy a file from the AIK to a hard drive with ample room for the VM.
3. Download and move a script which converts a Windows 7 install CD into a VHD.
4. Download and install Windows 7 Virtual PC.
5. Create a virtual machine.
6. Start the Windows 7 VHD virtual machine.
7. Install Windows 7 as normal.
8. Install the Integration Components.

Detailed Instructions:
1. Download the Automated Installation Kit; which is an ISO file.  ISO's are not normally readable by Windows so I used Slysoft's free virtual clone drive.  Slysoft's software will install a virtual DVD drive which shows up in the system tray with a new drive letter.



Right click on its system tray icon and "mount" the AIK.ISO file that you downloaded.  Let autorun start the AIK install or alternatively double-click on StartCD.exe.  Install the software.

2. Download the Automated Installation Kit Service Pack 1.  Mount the downloaded waik_supplement_en-us (or equiv).ISO and copy the contents into the AIK PETools folder (c:\program files\Windows AIK\Tools\PETools - if you used the defaults).
3. Download the Microsoft WIM2VHD.WSF script. Now you want to copy WIM2VHD.WSF to a large drive.  This will be the location where your new Windows 7 virtual drive will be created.  Also, go into c:\program files\windows AIK\Tools\ and copy imageex.exe (from the appropriate CPU-type subfolder) to the same drive as WIM2VHD.WSF.
4. Make your Windows 7 32-bit DVD/USB source accessible and run this command from an elevated command line (right-click cmd.exe runas-administrator) from the folder which has WIM2VHD.WSF and imageex.exe:
cscript wim2vhd.wsf /wim:d:\sources\install.wim /sku:{professional|enterprise|ultimate} 
note: d: - current Windows 7 install source location; sku type is Windows version (pick one).
 

5.  When the script successfully completes, it will create the VHD file and place it in the folder where you ran the script.  It will have a name similar to this:
(6.1.7600.16385.x86fre.win7_rtm.090713-1255.Enterprise.en-US.vhd)

6. Download Windows Virtual PC. You'll have to pass a Windows license verification authentication first.  Also, check your computer to ensure it can support a virtual machine.  Your BIOS and components have to possess this capability and download and run this Microsoft tool to test your computer.  After you have tested for compatibility and validated your license, install Windows Virtual PC.  You will have the choice of installing the 32 or 64 bit version.  For some reason, I can only use 32-bit virtual machines even though I have the 64-bit Virtual PC software.  I think it might be a software limitation.  Also, be aware that if you've disabled the Windows Update service, this software will be unable to install.

7.  From the Start Menu, open Windows Virtual PC.  Create a Virtual Machine and select your newly created VHD.  After creating the VM, click on Settings and review/alter the settings to suit your needs.



8.  Open the VM and you'll see it perform sysprep steps as it installs Windows 7 in your Virtual Machine.
9. When finished, it will act like a normal Windows installation and need anti-virus, security patches, and other normal utilities.
10.  Ensure to install the Integration Tools found on the VM's Tools menu.  This will allow you to move your mouse in and out of the VM without it being captured.  To break your mouse out of the VM, press the Windows keyboard key.


This blog entry based on information from:
http://forums.mydigitallife.info/archive/index.php/t-32822.html
http://www.hanselman.com/blog/StepByStepTurningAWindows7DVDOrISOIntoABootableVHD VirtualMachine.aspx

No comments: