VirtualBox errors after installing Windows Phone SDK

For my work on SharePoint, I’m running VirtualBox on my Windows 8.1 laptop. Today, after installing the Windows Phone SDK for Visual Studio, those VM’s suddenly would not start any more. The error displayed:

"vt-x is not available (VERR_VMX_NO_VMX)"

Uhm ok. What happened?

Well, part of the SDK installation is Hyper-V. They use Hyper-v to run the Windows Phone emulator like a sort of VM. After installing Hyper-v, the hypervisor is launched upon boot, nestling itself in between the OS and the hardware for optimal virtualization capabilities. Problem with this is that the hypervisor is locking virtualization parts that VirtualBox needs to run, at least for 64-bit machines it does.

Solution? Disable the hypervisor by running the following command in an elevated command prompt:

bcdedit /set hypervisorlaunchtype off

This introduces a new problem; since without the hypervisor launched…

hypervhypervisor

I haven’t found a way around this. It appears to be one or the other. You could create a batchfile which sets the hypervisorlaunchtype and reboots your system and use those to boot into the proper mode, but running the two simultaneously just doesn’t seem possible.

So I’m now going to see wheter I can drop VirtualBox and use Hyper-V for my VM’s instead. That way there’s no need to switch.

Update: running the machine in Hyper-V was no problem at all. What you need to do is convert the harddisk file (when it is not yet VHD) to the Hyper-V VHD format. In Hyper-V, be sure to create a Generation 1 VM, because generation 2 needs a VHDX file and won’t work or convert your existing disk (did not go in to the trouble of finding out why). Then you can just boot your machine and leave the hypervisor enabled to use in combination with Windows Phone SDK.

Update 2: my system is dual boot between a corporate Windows 7 install and my own Windows 8.1 install. I had to run the VM in Windows 7 mode as well and can now verify that you can still use VirtualBox for that. So I now have VirtualBox running in Windows 7 and Hyper-V running in Windows 8, both using the same VHD file. I’m unsure whether this is supported and you will probably want to refrain from options as “save state” and alike.

Leave a Reply

Your email address will not be published. Required fields are marked *