11

I just install docker on a windows 2019 server to run linux containers.

I follow the this guide, "Running Linux Containers on Windows Server 2019" chapter. When i try to run the bash shell i got the following error:

docker.exe: failed to register layer: failed to start service utility VM (applydiffe53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d): container e53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d_svm encountered an error during CreateContainer: failure in a Windows system call: The virtual machine could not be started because a required feature is not installed.

Anyone knows what feature is missing?

Update: It seams the problem has to do with a first error on the procedure. When running:

Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtensions $true

it throws the error:

Get-VM : Hyper-V was unable to find a virtual machine with name "ContainerHost". 

Witch i discard believing that was a guide in the script because there is no command to create this WinContainerHost virtual machine anyware.

Solving is more confusing, there are 2 types of containers, hyper-v and server containers, as posted in this guide. I am not sure what path to follow. I am pretty lost.

MiguelSlv
  • 9,553
  • 7
  • 72
  • 127
  • 2
    Try ```Get-VM *WinContainerHost* | Set-VMProcessor -ExposeVirtualizationExtensions $true``` instead – Stanislav Trifan Oct 26 '19 at 16:57
  • What did you end up doing? Just curious - do you run windows 2019 in the cloud or on the premises? I want to run linux containers on windows 2019 - that is LCOW, but in all articles I found it says it's not ready for production. – costa Dec 14 '19 at 01:43
  • Yes, i found out late. So i give up and setup up a side linux host for linux containers. I am not happy with the solution, but for now there is no other safe way. – MiguelSlv Dec 14 '19 at 12:18
  • Still no answer to this? My client forces me to use Windows Server but I'm getting the same error as you – Mojimi May 03 '20 at 17:58
  • I'm trying this on a Windows Server 2019 provided by AWS (EC2) – Mojimi May 03 '20 at 18:07
  • As far as i know is not yet ready for production. – MiguelSlv May 03 '20 at 19:05
  • Anything in the docker service logs? Is hardware virtualization enabled in BIOS? – root May 04 '20 at 01:24

1 Answers1

4

Sorry, I don't have enough reputation to comment/ask more information.

Hyper-V containers or Moby VM are mandatory when running Linux containers - virtualization is required to run those containers. So in this case, you can't use "server containers".

Enable VT-x e.g. virtualization from BIOS - mandatory for nested virtualization. With AWS you need Bare Metal instance.

If these are OK, you could you try already mentioned command

Get-VM *WinContainerHost* | Set-VMProcessor -ExposeVirtualizationExtensions $true

Instead, if they name differs a bit. If still no success, Get-VM command should list all VMs, what is the output?

You can install required modules for running LCOW with

Install-WindowsFeature -Name Hyper-V,Containers -IncludeAllSubFeature -IncludeManagementTools

And try again. If it still does not exist here is the script for creating "ContainerHost".

Niklas
  • 1,200
  • 1
  • 9
  • I'm running into the same problem as OP. When I run Get-VM nothing is returned. I don't get any errors running the "Get-VM *WinContainerHost*" code. – Edvard-D Apr 20 '21 at 08:12