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.

Advertisements

26 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

    Like

  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

    • 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

  9. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s