If you are like me trying to run windows Docker containers in a hyper-v vm windows 10 guest on a windows 10 host, you might have come across above issue, we can fix this issue in two steps.
- First make sure you are running on most up to date windows 10, prerequisite for OS requirements is to have Windows 10 Anniversary Update.
- Second enable nested virtualization, why do we need to do that ?
In this case, Hyper-V has been configured to expose virtualization extensions to its guest VM. A guest VM can take advantage of this, and install its own hypervisor. It can then run its own guest VMs, more info visit msdn blog
So how to enable nested virtualization,
first turn off the vm, run below command on the host OS, I would say the root OS.
Enable networking for nested virtual machine, can be done in two ways Mac spoofing or NAT mode.
will go with Mac Spoofing, to enable MAC spoofing, run below command on host os.
Make sure the guest OS has enough memory to run MobyLinuxVm docker container to initialize, I would say at least 4 gigs.