Sunday, June 23, 2019

VirtualBox and Hyper V conflicts on Windows 10

If you are using Windows 10 operating system and want to use virtualization on it, then you have 2 options.

1. Using Virtual Box
2. Using Hyper V

This post is not about how to use them but instead, what are the issues you will encounter if you have them together.

One scenario is, you have VirtualBox installed and working fine. Then you realize you want to use a docker on your Windows machine. The VirtualBox working fine until will start comparing about virtualization and acceleration. After installing the docker on your windows, all your VMs on the VirtualBox cannot start. It complains about the availability of virtualization.

"The hardware virtualization is enabled in the Acceleration section of the system although it is not supported from the host system. It should be disabled in order to start the visual system"

The error message not straight forward to understand. As you know virtualization is required for docker or VirtualBox to work. First thing you will do now is, check whether your system is virtualization enabled or not. There are multiple options to check if your system is enabled with virtualization or not. Check the BIOS settings, check the CPU section of the Task manager. 


Now you start worrying more about the possible reason for VirtualBox failure. The reason for this failure is having VirtualBox and Docker running on your system. 

If you install docker in your Windows, it will enable the Hyper V and install a virtual machine for docker to work. This is the requirement for docker on Windows. Both VirtualBox and Hyper V cannot run together. However, the later versions of docker might come up with some capability to have them together. 




To solve this problem, disable the Hyper V from optional features on your Windows 10. Remember, disabling the Hyper V will stop your docker. Only if you are not interested in docker and only need VirtualBox to run, then do this. 

Open the optional feature dialog box by entering the optionalfeatures in the run box



Then uncheck the box Hyper-V, it requires a restart. After a restart, your VirtualBox should work as before. 



Error messages:

1. Invalid settings detected. 

2. System acceleration page:
The hardware virtualization is enabled in the Acceleration section of the System page although it is not supported by the host machine. It should be disabled in order to start the virtual system.

3. General Basic page:
The virtual machine operating hint is set to 64-bit type. 64-bit guest system require hardware virtualization, so this will be enabled automatically if you confirm the changes. 

4. Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT


Failed to open a session for the virtual machine ubantu.
Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).
Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}





9 comments:

  1. I am going to follow the steps described above in the text in order to achieve the main goal. Thank you for reviewing the process.

    ReplyDelete
  2. I really think that these errors should be fixed as soon as possible to make the experience from using the opportunities of it more convenient.

    ReplyDelete
  3. In my case, Hyper-V is already disabled, still I'm getting this issue

    ReplyDelete
    Replies
    1. Same problem someone help

      Delete
    2. Same for me. Hyper-V is already disabled.

      Delete
    3. you should go to BIOS and enable the virtualization.

      Delete
    4. same dudee... did you find any solution?

      Delete
    5. Additional Notes for Windows Hosts

      Hyper-v competes for resources and needs to be disabled. To check the status of Hyper-v in Windows 10, | Run | OptionalFeatures.exe, and look for the "Hyper-V" option. The box should be empty, not checked or shaded. If you want to be absolutely sure that Hyper-v is gone then open an administrator command console and type "bcdedit /set hypervisorlaunchtype off". Note that this changed a boot option, hence it will only take effect on next boot. So make sure to fully power down and reboot the host after changing the Hyper-v setting.
      .
      On some Windows hosts with an EFI BIOS, DeviceGuard or CredentialGuard may be active by default, and interferes with OS level virtualization apps in the same way that Hyper-v does. These features also need to be disabled. On Pro versions of Windows you can do this using gpedit.msc (set Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security to Disabled. CredentialGuard is a subset of DeviceGuard, so disabling the former should be enough. If you cannot use gpedit for some reason then the equivalent registry hack is to find the key HKLM|SYSTEM|CurrentControlSet|Control|DeviceGuard|EnableVirtualizationBasedSecurity|Enabled and set it to 0.
      .
      On Win10 hosts, check Windows Defender > Device Security > Core Isolation Details and make sure settings in this panel are turned off, reboot the host from power down if you needed to make changes.
      "Core isolation [includes] security features available on your device that use virtualization-based security"
      ...which is why they can interfere with VirtualBox.

      https://forums.virtualbox.org/viewtopic.php?f=1&t=62339

      Delete
    6. On Pro versions of Windows you can do this using gpedit.msc (set Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security to Disabled. CredentialGuard is a subset of DeviceGuard, so disabling the former should be enough. If you cannot use gpedit for some reason then the equivalent registry hack is to find the key HKLM|SYSTEM|CurrentControlSet|Control|DeviceGuard|EnableVirtualizationBasedSecurity|Enabled and set it to 0 (write 'regedit' to enter in registry editor of window)

      Delete

How to create self signed ssl certificate, easy steps

 These are the ready commands to create self-signed SSL certificate. These certificates can be used for testing purposes. For a production-g...