If you’ve seen my other post on running VirtualBox, you know that I’ve been running Parallels desktop for some time. I converted off BootCamp to VirtualBox a few months ago so I could update my older iMac to Mac OS X 10.9 (Mavericks). Over this past weekend, I decided to try and convert my main Windows/XP image (under Parallels Desktop) on my newer iMac to VirtualBox to prepare for Mavericks on that machine. There were a number of things I learned that I wanted to share.
For me, this was a must work scenario because of the almost daily updates being made to the Windows XP image by my kids as they navigate classes on SOS (Switched On Schoolhouse). Because of this, I did some pre-conversion research, documented those steps and then performed the full conversion on a Friday evening of a 3 day weekend. That way I had plenty of time test and back out (if necessary) before classes resumed on Tuesday.
Creating a VDI Image
Based on the research, I opted for creating a VDI (Virtual Disk Image) file format instead of VHD (Virtual Hard Disk). Both can be read by VirtualBox, but the VDI (Virtual Disk Image) format allows for more flexibility (disk expansion) than VHD. I also found out that I would need to first create the VHD image using a MS utility (Disk2vhd) then use VBoxManage utility to convert it to VDI. It took 2-3 hours to run these 2 utilities since the boot image was almost 32GB. Here are the steps I took to accomplish this:
- Locate the Parallels images folder (/Users/<your username>/Library/Parallels)
- Copy the Windows XP image (will take a few minutes) and rename
- Launch the copied image in Parallels by doing the following:
- Start Parallels
- File –> Open and select copied/renamed image
- Click ‘Create New’
- Start XP. If it was asleep, perform a restart
- If you’re prompted to Activate Windows, click NO (we’ll do that later)
- Download the Disk2VHD utility (can be found here) and expand
- Remove the Parallels Tools via the Control Panel –> Add/Remove Programs. (Requires a reboot)
- On the Mac, enable file sharing (Settings –> Sharing –> Check ‘File Sharing’ and make sure to note the Shared Folder and User that has Read/Write access.
- Back on Windows XP, Start –> Explorer and map the Z drive to the MacOS drive (e.g. \\<ip address>\Desktop)
- Run Disk2vhd.
- Check ‘Prepare for use in Virtual PC’
- Uncheck ‘vhdx’.
- Uncheck ‘Use Volume Shadow Copy’
- Specify filename using mapped drive (e.g. z:\windowsxp.vhd).
- Press Create (this will take several minutes to complete)
- Back on Mac, bring up a Terminal window
- Run the following command to convert the VHD file to VDI: /usr/bin/VBoxManage clonehd Desktop\<file>.vhd <file>.vdi –format vdi
- Shutdown Windows and Parallels
- Store the .VDI file under /Users/<your username>/VirtualBox VMs/Windows XP folder
- Bring up Virtual Box and make the following setting changes:
- System/Motherboad – Base memory to 2048M
- System/Processor – Configure 1 CPU
- Display/Video – Video Memory to 64MB, Check ‘Enable 2D Video Acceleration’
- Storage/Storage Tree/Controller: IDE/Attributes – Type to PIIX4 (needed to avoid BSOD (Blue Screen Of Death) at boot up)
- Make sure your .vdi file is listed in the Storage Tree
- Network/Adapter 1/Attached to: – Bridged Adapter
- Boot up Windows/XP guest image
Network Printer Setup
In order to print from your Windows XP VirtualBox Guest using a USB printer attached to your Mac OS X host, you’ll need to do the following:
- On the Mac, bring up System Preferences
- Double-click ‘Print & Scan’
- Make sure your USB printer is selected in the ‘Printers’ window
- Check ‘Share this printer on the network’
- Click on ‘Sharing Preferences…’
- Make sure the ‘Printer Sharing’ item is checked.
- Make sure your printer is listed under ‘Printers:’ and the ‘Everyone Can Print’ is listed under ‘Users:’.
- From the Windows XP guest, start the Control Panel
- Double-click on the ‘Add Printer’ icon
- Click Next
- Select the radio button next to ‘A network printer, or a printer attached to another computer’ and click Next
- Click Next. A list of printers should appear. Look for the computer the USB printer is attached to. You may have to type in the name of the printer in the the box labelled ‘Printer:’ as well before pressing Next.
Setting Up Variable Screen Size
In order to be able to adjust the Windows XP size, you’ll need to mount and install the ‘Guest Additions CD Image’. Safe Mode is required for the install so if your Mac keyboard doesn’t have an F8 key, you’ll need to find a USB keyboard that does. Here’s the steps to do the install:
- Shutdown the Windows XP guest.
- Attached a USB keyboard to your Mac Desktop that has an F8 key
- Start the Windows XP guest and press the F8 key to bring up the Safe Mode window
- Select ‘Safe Mode with Networking’ and wait for the system to load
- Login with an administrator account
- Under the Devices pulldown menu, select ‘Insert Guest Additions CD image …..’
- You’ll be prompted to install the software
- Once it’s complete click the ‘Reboot Now’