Sunday, 18 November 2012

Windows 8 and importing VirtualBox VM's into Hyper-V

Upgraded to Windows 8 this weekend and it's definitely nice and painless. Other than the new start menu and the loss of Aero it's really not much different to Windows 7 externally, and after the upgrade all my apps continued to work like before as if nothing had changed.

The only real issue I had initially was with VirtualBox. The version I was running won't run on Windows 8 (the latest might do), but that wasn't an issue as I was already planning to switch to using Hyper-V instead. Importing my existing .vhd's into Hyper-V should have been straight forward, but I kept getting errors similar to this :

New Virtual Machine Wizard
The Virtual machine management service encountered an error while configuring the hard disk on virtual machine <Guest name>.

Failed to add device 'Synthetic Disk Drive'

'<Guest name>' failed to added device 'Synthetic Disk Drive'. (Virtual machine ID xxx)
The Virtual Machines configuration xxx at '<Hyper-V Path>' is no longer accessible: The requested operation cannot be performed on a file with a user-mapped section open (0x800704C8)

when I tried to create a new VM using the existing vhd as the disk. The issue turned out to be AVG and its resident shield scanning the files as mentioned here, once I'd excluded all those folders I was good to go and things started working.