Friday, December 14, 2012

No MS Virt For You!

As a developer I have found having virtual machine images the best thing since sliced bread when it comes to testing installs onto a clean system and to target multiple versions of MS Windows from the convenience of my desktop. I had been using Virtual PC since it was aquired from Connectix and appreciated the drag-and-drop easiness of moving my installer files onto the target machine and it's overall integration into my desktop environment.

I should have researched this key tool before upgrading but I didn't. After switching and attempting to install Virtual PC I found out that it is no longer supported. No big deal, everyone says to switch to Hyper-V, it's new and therefore better and the  System Center Virtual Machine Manager is suppose to be able to convert Virtual PC images to work with the Windows 8 Pro built-in Client Hyper-V. When I went to Control Panel > Programs > Turn Windows features on or off, I found that Hyper-V Platform was disabled. When I hover over the option it says "Hyper-V cannot be installed. The processor does not have second level address translation (SLAT) capabilities." So, like the NX bit fiasco with some other systems, my hardware is not up to snuff for the latest and greatest from Microsoft.

What about an older version of Virtual PC? Virtual PC (for Windows 7) required Windows validation, and that tool failed with error 0x80096002, most likely due to the tool being for Windows 7, so no Windows 7 Virtual PC for me. Virtual PC 2007 SP1 "has compatibility issues".

VirtualBox to the rescue!

I had been using VirtualBox for my Debian and Ubuntu images because it was such a pain to get them going under Virtual PC. I had also used it to preview the Windows 8 RC because again Virtual PC was picky. It worked great on Vista as long as you ran the versions of Windows it wanted to target, otherwise it was not so good but VirtualBox "just worked". I had preferred Virtual PC for it's smoother desktop integration but now I was forced to switch.

I stressed unnecessarily for a bit trying to find a conversion tool that would switch from Virtual PC format files to VirtualBox ones. There are two sets of files used by both camps, an XML configuration/settings file (.vmc and .vbox) and a hard disk image file (.vhd and .vdi). VirtualBox can open the Virtual PC vhd disk image files, so no conversion is needed there. All you need to do is create a new virtual machine, choose your settings and select the existing disk image. I opened the vmc file in a text editor to see what settings I was using before, mostly for the memory but also to see what kind of devices I had attached. Since both use an XML format I still find it surprising that there is no import option in VirtualBox or conversion tool.

Once VirtualBox had the new virtual machines pointing at the old vhd files it wasn't very much more work to get things working again. Since I wasn't expecting the trouble I hadn't been proactive and removed the Virtual PC guest additions before switching. So, when I booted into each Windows VM the mouse didn't work at all and they kept offering to install a bunch of hardware. I declined all offers and used the keyboard to get to the Control Panel and uninstall the guest additions and reboot. This got the mouse working. I went ahead and installed the VirtualBox guest additions and then accepted the driver installations.

Only one system required a little more work than this. It must have been using the IDE interface previously and VirtualBox setup the drive using the SATA interface by default for that version of windows. To fix the problem I just had to remove the disk image under the SCSI interface and add it under the IDE one. After booting up it saw the SATA interface and added it's drivers. I shutdown and moved the image back and booted without any trouble. Some tutorials have you get into the hardware control panel and remove devices. For whatever reason that wasn't necessary in my case.

No comments:

Post a Comment