Run Hyper-V and VirtualBox on the same machine

Recently I upgraded to the Windows 8 RTM build for my main work laptop, and began working with Hyper-V, which is available on a client OS for the first time with Windows 8.  Since I use virtualization to do SharePoint development every day, I was eager to see what Hyper-V could do.  So far, I am impressed.  It performs well and stays out of my way when I’m not using it.

However, my project team at work is heavily invested in VirtualBox, and rather than try to make all their updates to my new VM, it makes more sense to develop on the same system as the rest of the team.  The challenge is that VirtualBox and Hyper-V cannot co-exist on the same machine.  Only one hypervisor can run at a time, and since Hyper-V runs all the time, while VirtualBox only runs when it is launched, VirtualBox is the loser in this scenario.

The workaround (there’s always a workaround, isn’t there?) is to disable Hyper-V when you want to run VirtualBox.  I found a few different ways on the web to accomplish this, including altering the registry, and running a command.  But the only one I found that worked involved changing the boot configuration using bcdedit. 

If you run bcdedit with no arguments, you should see a property called hypervisorlaunchtype.  This will be set to off or auto.

 

To disable Hyper-V in order to use VirtualBox, open a command prompt as administrator and run the command:

bcdedit /set hypervisorlaunchtype off

You’ll need to reboot, but then you’ll be all set to run VirtualBox. To turn Hyper-V back on, run:

bcdedit /set hypervisorlaunchtype auto

and then reboot.

42 thoughts on “Run Hyper-V and VirtualBox on the same machine

  1. So you tried editing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvservice and changing the REG_DWORD Start from 0x1 to 0x3?

    I am curious whether this method works, because if it does it would enable Hyper-V to be run from an elevated command prompt with “net start hvservice” after closing VirtualBox.

    I don’t have the time to try it myself at the moment!

    Like

    • No, I did not try that. I generally try to steer clear of the registry, but if that approach negates the need for a reboot it might be worth a shot. I’m not doing a lot with Hyper-V at the moment, but that could change when 2013 rolls around.

      Like

  2. Also a note (for my future reference too) that you can use BCDEDIT tool to clone a boot profile then disable the launch of the hypervisor and switch between the two on boot!

    1. Launch as administrator a command window
    2. Run BCDEDIT with no parameters to obtain the current boot GUID, copy to clipboard
    3. “bcdedit /copy {current-boot-GUID} /d “Hyper-V Enabled”
    4. Run BCDEDIT with no parameters to obtain the new boot GUID for Hyper-V enabled, copy to clipboard
    5. “bcdedit /set {new-boot-GUID} hypervisorlaunchtype auto

    Liked by 1 person

  3. Pingback: Windows 8 Upgrade

  4. I tried what you suggest, it worked like a charm after the reboot and I could actually run a 64 bit Linux on VirtualBox. Problem is after a day I powered my computer and Hyper-V is ON again, I check the BCDEDIT and still says its off at startup. Anyway to shut it down again for good? Every time it runs at startup it takes posession of the VT-x of the CPU, and I can’t run my Vbox virtual machines. Its a nuisance on Win8 Pro.

    Like

    • hmmm, it does not work that way for me, and I am running Windows 8 as well. When I set hypervisorlaunchtype, it stays that way until I explicitly set it again. The only things I can think of are: does your machine have any other custom boot up settings that might be overriding it, or, have you manually altered the startup mode of any of the hyper-v related services?

      You could try Ross’s suggestion in the comments above, which is to create 2 boot profiles, one each for hyper-v and virtual box. So you’d essentially be creating a dual-boot, only booting into the same system with different hypervisor settings.

      Good luck!

      Like

  5. Pingback: Linux Experiments with Hyper-V on Windows 8 | jdhnet

  6. Pingback: Gonna get myself connected | Ka's Computer Commentary

  7. Pingback: Fix “VT-x is not available (VERR_VMX_NO_VMX)” Virtualbox error | Deltacode Blog

  8. Pingback: Virtual Machines | Vincent

  9. I thought you found “the only solution that worked” without having to reboot.

    I have been turning hyper-v on/off thro [Programs & Features] -> [Windows Features], and after that I would have to restart Windows.

    I don’t think I’ll go thro the trouble of bcdedit, when the simplest way is already available thro the control panel. What I hope for is a way that does not require restarting the Windows host.

    Like

    • Nope, it the identifier field. It’ll display as {current} if that’s your currently booted configuration. When updating using bcdedit, {current} will be good enough. If you have a multi-boot setup, the not-booted setups will have a guid in that space. If you need that guid for some other context, I’m not sure how to get that.

      Like

      • Thanks for getting back on that. I managed to figure that out as well though was a bit unsecure. After doing /copy it does then create a new identifier, eg:
        Windows Boot Loader
        ——————-
        identifier {8b7681ae-6ac4-11e6-bf65-507b9dfb72df}

        Like

  10. Hi there, so my case is that I’ve already successfully turned the hyper-v off, nevertheless when im trying to run my apps on android studio, the system keep reminding me to turn my hyper-v off. So regarding to this issue, I’m looking forward for your help and it would be greatly appreciated! Thanks!

    Like

  11. Pingback: Not able to start Genymotion device - QuestionFocus

  12. Pingback: Executando o Hyper-V e o VirtualBox na mesma máquina - Erudio

  13. Pingback: Executando o Hyper-V e o VirtualBox na Mesma Máquina – Gianfratti.com

  14. I turned hyper-v on to try and run a VM I had, it didnt work and then, because I know windows just loves to f*ck vitrualization and vistual stuff, I tried to open virtual box to check if I could open my virtual machines I already had before and I cannot use them. I tried to turn off the hyper-v “feature” and then ran the “bcdedit /set hypervisorlaunchtype off” on the cmd as administrator, rebooted my laptop and still no luck. I’m running windows 10, so I don’t know if I have to do something else, any help/ideas?

    Like

    • after you add the bcdedit entry you should see a multi boot screen where you pick which configuration you want to run. If you’re not seeing that you’ve probably done the bcdedit wrong.

      Like

  15. Pingback: Hyper-V and VirtualBox - Silicon Prairie Dog

  16. Pingback: Why can’t VirtualBox or VMware run with Hyper-V enabled on Windows 10 – Boot Panic

  17. Pingback: [Solved] Xamarin Android Player is unable to run API 21 or higher emulators

  18. Pingback: How do I get a channel layer from Django-Channels lib to communicate with Redis in Oracle VM using Docker Toolbox? - Boot Panic

  19. Pingback: How do I get a channel layer from Django-Channels lib to communicate with Redis in Oracle VM using Docker Toolbox?

Leave a comment