71

I am a new to Docker. After the installation of Docker Toolbox (OS: Windows 10) I run Docker Quickstart Terminal and in the console I see this:

Running pre-create checks...
Error wirh pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. It it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Look like something went wrong in step 'Checking if machine default exists'...
Press any key to continue...

What did I do wrong? All checking of system and install steps are taken from here.

Thank you very much for your help!

Moshisho
  • 2,781
  • 1
  • 23
  • 39
Denis Starkov
  • 815
  • 1
  • 6
  • 10
  • Have you tried uninstalling/deactivating Hyper-V? Or trying with running with --virtualbox-no-vtx-check? If so do you still get the error? – Fermin Apr 27 '16 at 09:46
  • Is your system virtualization is active ? As shown in document ? – Riddhi Gohil Apr 27 '16 at 10:11
  • 3
    Deactivating Hyper-V solved the problem! Thank you everybody – Denis Starkov Apr 27 '16 at 10:29
  • @DenisStarkov did you ignore/get the warning "Hyper-V feature is not enabled. Do you want to enable it for Docker to be able to work properly? Your computer will restart automatically. Note: Docker Toolbox will no longer work." – Winnemucca Apr 11 '17 at 14:41
  • [Virtualization enabled but not being displayed windows 10](https://superuser.com/q/1329033/241386) – phuclv Jun 21 '18 at 12:00
  • Deactivating Hyper-V solved the problem Thanks – Shahids Feb 18 '20 at 10:58
  • https://jayvilalta.com/blog/2016/04/28/installing-docker-toolbox-on-windows-with-hyper-v-installed/ For those-- Installing Docker Toolbox on Windows with Hyper-V Installed – teddcp Sep 13 '20 at 01:27

9 Answers9

57

Hyper-V and VirtualBox are conflicting each other.

You can either uninstall Hyper-V or run

docker-machine create -d virtualbox --virtualbox-no-vtx-check test

Source

ArgonQQ
  • 1,917
  • 1
  • 11
  • 12
  • uninstalling hyper-V didn't help for me, when i did that it just stalled on preinstall checks. running the alternative seems to be working though. – John Nicholas May 17 '16 at 21:06
  • 1
    Using Windows 10, I got blue screen two consecutive times running this command – deFreitas Mar 19 '18 at 05:16
  • @deFreitas Not reproducible over here – ArgonQQ Mar 19 '18 at 21:25
  • This works but the VM instance created has some issues... this leads to another Hyper-V error. https://discuss.erpnext.com/t/virtualbox-wont-run-raw-mode-unavailable-courtesy-of-hyper-v/34541 – Jaider Apr 09 '18 at 21:21
33

Docker supports Hyper-V as the driver

You need to perform the following steps:

  • Create a virtual switch, refer to this article on how to do that

  • Create a docker machine using that network switch and hyper-V driver.

    docker-machine create -d hyperv --hyperv-virtual-switch "name of the virtual switch created above" default
    
phuclv
  • 37,963
  • 15
  • 156
  • 475
curiousgeek
  • 846
  • 6
  • 11
13

I got the same error when I installed Docker Toolbox on my Windows 10 machine.

Solution:

  1. Install Docker Community Edition (not Docker Toolbox)
  2. Enable Hyper-V

Open Control Panel -> System and Security -> Programs (left panel) -> Turn Windows features on or off -> Check the Hyper-V box

As of 2017's Win 10, if you don't have Hyper-V option, then your Windows OS is not Enterprise Edition. Also, Docker seems to work a lot better on Intel processors (not AMD).

  1. Add C:\Program Files\Docker\Docker\resources\bin to Path in Environmental Variables.
  2. Open Git Bash and type docker-compose up and now that command should work.

If you don't have GitBash, please download it.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Gene
  • 10,819
  • 1
  • 66
  • 58
  • 1
    Just to make it explicit, Docker Toolbox is an older tool that precedes Docker for Windows. It installed VirtualBox which was used to run the Linux VMs we need. Then came HyperV and Windows 10 with hypervisor support which lets you run containers natively. You no longer need Docker Toolbox. It is subsumed by Docker Compose. – Nikhil Silveira Aug 23 '19 at 06:34
4

I was having the same issue, and this blog post solved it. The author runs you through the steps of adding the --virtualbox-no-vtx-check flag to the docker shell script.

Virtualbox and Hyper-V don't play well together. I am NOT the author.

cph2117
  • 2,651
  • 1
  • 28
  • 41
3

I set the Hyper-V off using windows feature on off and it worked for me.

  • Also if you have docker installed you'll want to hit cancel when it prompts you to start Hyper V. If you want to use docker-toolbox – janDro May 01 '18 at 18:45
2

See if when you run:

docker-machine create -d hyperv --hyperv-virtual-switch "Virtual Switch" default

you get Error with: pre-create check: "Hyper-V PowerShell Module is not available"

If so just enable in Docker(icon on your desktop)->settings->expose daemon on TCP ...

JuanCrg90
  • 1,006
  • 13
  • 24
1

You need to disable Hypervisor to check new application that use VT-x before the virtual machine launch:

  1. Open the command prompt as Administrator

  2. Run bcdedit to check hypervisor status:

  3. Check hypervisor launch type.

  4. If is set to auto then disable it:

    bcdedit /set hypervisorlaunchtype off 
    
  5. Reboot host machine and launch VirtualBox again

After performing above steps I opened again Docker Quickstart terminal and it is working fine.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Suresh V
  • 11
  • 1
0

I pressed the Windows Button on keyboard. Typed 'Hyper-V Manager'. It opened the 'Hyper-V Manager'. Then I right clicked on my machine name. There was an option to 'stop'. I selected this option. It stopped the 'Hyper-V' on my machine and then Kitematic worked fine, i.e., it download the hello-world-nginx and displayed the web page.

NOTE: This is strange and I am not sure why. Once I have done above steps, now when I restarted the Hyper-V using Hyper-V Manager, Kitematic is still working and downloading images. Can anybody comment why it is now still working when Hyper-V is also running ? Thank you.

Good Ali Ahsan

0

The solution as suggested by @Gene is correct and works perfectly if:

  1. One has windows pro edition
  2. Both Hyper-V Management Tools and Hyper-V Platform are enabled

Sometime this isn't always the case; here is what to do:

Check Windows Edition:

To check which version right click on Windows key and select System. Scroll down to Windows specifications and look at [Edition]

Check Hyper-V Platform (virtualisation)

For Hyper-V Platform to be enabled one must turn on virtualisation; normally this is done via the BIOS.

On HP laptop one this is done from the BIOS.

  • On start-up click Ctrl+F10
  • Press the right arrow key to System Configuration tab.
  • Select Virtualization Technology and then press the Enter key.
  • Select Enabled and press the Enter key.

Once these steps are done then:

  1. Search for Turn Windows features on or off.
  2. Scroll down to Hyper-V
  3. Tick this box (Ensure you see a tick NOT a black box which indicates some features not enabled)

Upon restart docker should be running... good luck !!

Ithar
  • 4,865
  • 4
  • 39
  • 40