First, create two directories:
Create C:\lcow, which will be used as scratch space for Docker while preparing the containers.
Also create C:\Program Files\Linux Containers. This is where the Ubuntu container image will live.
You will need to give this folder extra permissions to allow Docker to use the images from it. Run the following Powershell script in an administrator Powershell window:
# Give the virtual machines group full control
$acl = Get-Acl -Path $Root
$vmGroupRule = new-object System.Security.AccessControl.FileSystemAccessRule("NT VIRTUAL MACHINE\Virtual Machines", "FullControl","ContainerInherit,ObjectInherit", "None", "Allow")
Set-Acl -AclObject $acl -Path $Root
Save this file as set_perms.ps1 and run it:
TIP You may need to run ‘Set-ExecutionPolicy -Scope process unrestricted’ to be allowed to run unsigned Powershell scripts.
C:\Users\mathi\> .\set_perms.ps1 "C:\Program Files\Linux Containers"
Now, copy the Ubuntu container image .vhdx file that was decompressed at the previous step to uvm.vhdx under C:\Program Files\Linux Containers.