Problem with Docker on Windows Server 2019: not running Linux containers

Viewed 1659

I was trying to install Docker on a fresh Windows Server 2019 using this guide (other guides seem to use the same procedure).

NB: I was given a Windows Server 2019 with Hyper-V installed, but with no virtual machine.

My installation commands were:

Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All -NoRestart
Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
Restart-Computer –Force

And then:

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

Which returns an error:

Get-VM : Hyper-V was unable to find a virtual machine with name "WinContainerHost".
At line:1 char:1
+ Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtens ...
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (WinContainerHost:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM

Now, my first question is: what is WinContainerHost? Who did create it? I cannot see it in my Hyper-V Management Console.

Nevertheless, I try to go on with the Docker installation process:

Install-Module DockerProvider
Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview
[Environment]::SetEnvironmentVariable(“LCOW_SUPPORTED”, “1”, “Machine”)
Restart-Service docker

After the process, typing docker --version, I get:

Docker version 17.10.0-ee-preview-3, build 1649af8

It seems that Docker is installed. I then try to launch a container with:

docker pull nginx:latest

which results in:

latest: Pulling from library/nginx
33847f680f63: Extracting [==================================================>]  27.15MB/27.15MB
dbb907d5159d: Download complete
8a268f30c42a: Download complete
b10cf527a02d: Download complete
c90b090c213b: Download complete
1f41b2f2bf94: Download complete
failed to register layer: failed to start service utility VM (applydiff 8f46920b86bdcdab20b89a73c657f59c52f0271fd2fa27bf87bb875c55c11f7a): 
container 8f46920b86bdcdab20b89a73c657f59c52f0271fd2fa27bf87bb875c55c11f7a_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. (0xc0370102) extra info: {"SystemType"
:"container","Name":"8f46920b86bdcdab20b89a73c657f59c52f0271fd2fa27bf87bb875c55c11f7a_svm","Layers":null,"HvPartition":true,"HvRuntime":{"ImagePath"
:"C:\\Program Files\\Linux Containers","LinuxInitrdFile":"initrd.img","LinuxKernelFile":"bootx64.efi"},"ContainerType":"linux",
"TerminateOnLastHandleClosed":true}

My intuition tells me that the problem is with the Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtensions $true, but I cannot find a way to solve it.

Could someone please give me more insight on this? Thanks in advance.

0 Answers
Related