Switch easily between VirtualBox and Hyper-V with a BCDEdit boot Entry in Windows 8.1
I've been using GenyMotion for a FAST Android Emulator when developing with Visual Studio and Xamarin. However, I also use Hyper-V when developing for Windows Phone. GenyMotion use VirtualBox, which has it's own Hypervisor and you can't have two.
Some sites say to use Add/Remove Features to turn the Hyper-V support off, but that seems like a big deal to do what should be a small thing.
Instead, from an administrative command prompt I made a copy of my boot menu with a "No Hyper-V" entry:
Note the first command gives you a GUID and you then copy it and use it with the second command.
C:\>bcdedit /copy {current} /d "No Hyper-V"
The entry was successfully copied to {ff-23-113-824e-5c5144ea}.
C:\>bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off
The operation completed successfully.
Now, this is important. In Windows 8.x, Windows is optimized to startup FAST. And it does. On my Lenovo it starts in about 3 seconds, faster than I can press any buttons to interrupt it. But when I want to dual boot, I need it to really shut down and give me an option to chose this new boot menu.
In order to access the new boot menu, I select Settings (Windows Key + C) then Power, and Restart but hold down shift on the keyboard while clicking Restart with the mouse.
You will get this scary looking Blue Screen. Select "Other Operating Systems" and your "No Hyper-V" option is in there.
Now, you can run Virtual Box nicely but still choose Hyper-V when you want. You can confirm VirtualBox works by noting that the Acceleration tab will not be grayed out under System Settings for your VMs. Reboot normally and Hyper-V will be back and ready to go. Here's Android running in VirtualBox via GenyMotion.
There's touch support too! If you're not doing Android development like this with Visual Studio and Xamarin, frankly, you're missing out.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
http://derekgusoff.wordpress.com/2012/09/05/run-hyper-v-and-virtualbox-on-the-same-machine/
Good info for those it suits, though.
I'd like to see wp8 emulators go back to non-hypervisor requirement. It's crazy to me that I can write a full win8 app w/o the need for hyper-v, but can't write a "little" phone app.
http://blog.dot42.com/2013/08/running-android-43-in-hyper-v.html
http://luisrato.wordpress.com/2013/10/15/how-to-install-android-x86-on-hyper-v-part-1-install/
http://www.servethehome.com/installing-android-x86-hyper-v-windows-8-1/
I would assume that Genymotion itself is using Android-x86, or an enhanced fork?, (I didn't think VirtualBox could emulate ARM?) so there should be no reason why they couldn't deliver a Hyper-V image as well? Or is there additional secret sauce in Genymotion that I'm not aware of?
bcdedit.exe /bootsequence {your-target-boot-option-guid}
shutdown.exe /r /t 0 /f #(Reboot the computer immediately)
Note: The bcdedit /bootsequence parameter does not make any permanent changes to your boot sequence; it only applies on your next reboot.
This trick saves a few seconds when you need to boot into another dual-boot mode.
Is that because I have no Windows phone images?
I need this because AMD/ATI video drivers won't let Netflix Win8 app work if Hyper-V is running (WTF?!?!)
_______________________________
If you run VMWare Workstation or Fusion on your host, you can create separate VMs: one with Hyper-V and one with VirtualBox. You'd need to enable 'Virtualize Intel VT-x/EPT...'. Hyper-V doesn't have that feature, I'm not sure about VirtualBox. I think developing in a VM is a lot easier than dual-booting.
Hyper-V stands for "hypervisor." A hypervisor in the purest form runs your main OS/machine (the one you use to control the other machines, usually called domain 0) as a VM itself. As far as I know Hyper-V has some trickery to get domain 0 running at native speed; but it is still effectively a hypervisor; you would have the exact problems with VirtualBox if you were attempting to run it under Xen.
So, basically, Hyper-V is *always* emulating something.
The CPU extensions required for nested virtualization are relatively new, as far as I know only VMWare 8 supports VM nesting. Furthermore I have messed around with VM nesting and have to admit that it's pretty unstable.
I have GenyMotion running on my PC.. I executed adb devices and get a List of devices attached
192.168.56.101:5555 device
Can you provide some info on how to run GenyMotion from with VS?? I click on the project and there are no option to connect to the external emulator... GenyMotion isn't listed under Android Emulator Manager.
How do I get VS to recognize this in VS?? I looked under tools and other menus...
Thanks...
Suddenly PLEX server stopped working after Hyper-V installation on Win8.1.
Hyper-V seems to mess with the DLNA capability =( but now with this new boot entry its all fine.
"The Holy Grail": (native) VHD to 'hosted' (with Hyper/Vbox/VMware?...)
Still not possible?
Though if you'll allow me to share one rather annoying disadvantage of this solution... after finishing some work with VMWare Workstation, I went back to Hyper-V and all of my VMs complained about the network. It transpired that all of the Virtual Switches had been deleted and I can only assume that swapping from "Auto" to "Off" and then back again keeps all of the VM data but deletes all of the networks? I assume you're aware of this?
Comments are closed.
Well, it's as easy as it gets I understand. It's still quite silly for those of us who rarely shutdown their machines.