2

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.

EM90
  • 552
  • 1
  • 8
  • 22
  • Is this new Windows Server 2019 server a VM? if so is it Hyper-V, VMware etc. ? Did you setup [Virtualization-based Security](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.security.doc/GUID-CE292D3F-D4AC-4607-B262-DE19CE6E9F6B.html) – Otter Jul 29 '21 at 10:39
  • The Windows Server 2019 is a VM. I guess that it is a VMWare ESXI machine. Thanks for the hint, I am gonna check if Virtualization-based Security is enabled. – EM90 Aug 10 '21 at 09:45
  • I think the vm track is a red herring. On a windows server 2016 with 17.10.0-ee-preview-3 I have access to, there are no hyper-v vms involved. Get-VM returns nothing, and there are no vms listed in hyper-v manager. – hlovdal Oct 06 '21 at 10:17
  • Possibly a duplicate of https://stackoverflow.com/questions/60305059/docker-failed-to-start-service-utility-vm-with-lcow-on-windows-server-2019? – hlovdal Oct 06 '21 at 10:21

0 Answers0