Error running Docker container on a VMWare hosted Windows 10 machine

Viewed 4688

I have a windows 10 machine that is hosted on VMWare (vShpere 6.2 ) . I'm trying to run docker container on this machine and I've installed 'Docker for Windows' on the machine. When running the hello-world container I'm getting the following error.

c:\> docker run hello-world
docker: Error response from daemon: container b631237e1d24f87c3a578a753f550ce30aaaf1b5e21b984db5da7b59a83d7c20 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) 

The same instructions works on physical machine with windows 10. Hyper-V is enabled on the guest windows-10 machine.

I've found instructions on https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization but this is related to Hyper-V and not vmware.

Are there any instructions on how to run docker on a VMWare hosted windows OS? My purpose of using 'Docker for Windows' is so that I'd be able to run windows-continer on the windows-10 guest OS on vware.

6 Answers

Docker for Windows requires hardware virtualization support to run anything via Hyper-V. This means that VMWare has to expose Intel VT-x or AMD-V to the guest OS. This is disabled by default in vSphere, so you have to enable it manually to get docker support in the guest.

From the vSphere docs:

  1. Right-click the virtual machine and select Edit Settings.

    a. To locate a virtual machine, select a datacenter, folder, cluster, resource pool, host, or vApp.

    b. Click the Related Objects tab and click Virtual Machines.

  2. On the Virtual Hardware tab, expand CPU, and select Expose hardware-assisted virtualization to guest OS.

  3. Click OK.

You could try to turn virtualization on in your BIOS, according to an answer to a similar question. Look for “Intel VT-x”, “Intel Virtualization Technology”, “Virtualization Extensions” or something similar.

Power on the machine and open the BIOS (as per Step 1). Open the Processor submenu The processor settings menu may be hidden in the Chipset, Advanced CPU Configuration or Northbridge. Enable Intel Virtualization Technology (also known as Intel VT) or AMD-V depending on the brand of the processor.

Hyper V is the native virtualization technology of Microsoft. VM-ware uses the virtualization provided the processor, which is disabled most of the time. If its disabled you can't run docker machine on your machine. Please try this option of enabling the virtualization on your PC.

install latest vmware workstation > 15.5.5 version

which has the support of Hyper-V Host

With the release of VMware Workstation/Player 15.5. 5 or >, we are very excited and proud to announce support for Windows hosts with Hyper-V mode enabled! As you may know, this is a joint project from both Microsoft and VMware

https://blogs.vmware.com/workstation/2020/05/vmware-workstation-now-supports-hyper-v-mode.html

i installed VMware.Workstation.Pro.16.1.0

and it fixed my issue now i am using docker and vmware same time even my window Hyper-V mode enabled

Install VMWare WorkStation 16.x.x. Settings -> Option -> Advanced -> (ticked) Disable side channel mitigations for Hyper-V enabled hosts

Related