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}

How to Fix ImportError: No module named 'flask' with virtualenv

Flask is one of the most used frameworks in Python. If you are new to the flask and if you are getting this error - ImportError: No module n...