Invoke-WebRequest -UseBasicParsing -OutFile dockerd.exe https://master.dockerproject.org/windows/x86_64/dockerd.exe
Invoke-WebRequest -UseBasicParsing -OutFile docker.exe https://master.dockerproject.org/windows/x86_64/docker.exe
Remove-Item "$env:ProgramFiles\Linux Containers" -Force -Recurse
mkdir "$env:ProgramFiles\Linux Containers\"
cp lcow-initrd.img "$env:ProgramFiles\Linux Containers\initrd.img"
cp lcow-kernel "$env:ProgramFiles\Linux Containers\bootx64.efi"
I use RDP to connect to my Windows machine so can use:
Remove-Item "$env:ProgramFiles\Linux Containers" -Force -Recurse
mkdir "$env:ProgramFiles\Linux Containers\"
cp \\tsclient\rneugeba\AAA\lcow-initrd.img "$env:ProgramFiles\Linux Containers\initrd.img"
cp \\tsclient\rneugeba\AAA\lcow-kernel "$env:ProgramFiles\Linux Containers\bootx64.efi"
$env:LCOW_SUPPORTED=1
$env:LCOW_API_PLATFORM_IF_OMITTED="linux"
Remove-Item c:\lcow -Force -Recurse; mkdir c:\lcow
.\dockerd.exe -D --experimental --data-root c:\lcow
or
.\dockerd.exe -D -H "npipe:////./pipe//docker_lcow" --experimental -g c:\lcow
.\docker run --rm -ti busybox sh
or
.\docker -H "npipe:////./pipe//docker_lcow" run --rm -ti busybox sh
Windows Event log:
Get-WinEvent -LogName Microsoft-Windows-Hyper-V-* -MaxEvents 10 | ft -Wrap
hcsdiag.exe
to list/login to VMS
Setting:
$env:OPENGCS_DEBUG_ENABLE=1
when the daemon is in debug mode will grab additional logs/output from commands when the
utility VMs stop. Additionally setting OPENGCS_DEBUG_COMMAND
allows one to specify the
commands to execute.
To prevent the LCOW VM from being destroyed:
$registryPath="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\Debug"
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name "PreserveVmOnErrorDestruct" -Value 1 -PropertyType DWORD -Force
and to disable the it:
$registryPath="HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\Debug"
Remove-ItemProperty -Path $registryPath -Name "PreserveVmOnErrorDestruct"
cmd /c "netsh trace start globallevel=6 provider={0c885e0d-6eb6-476c-a048-2457eed3a5c1} provider={80CE50DE-D264-4581-950D-ABADEEE0D340} provider={D0E4BC17-34C7-43fc-9A72-D89A59D6979A} provider={93f693dc-9163-4dee-af64-d855218af242} report=di capture=no tracefile=c:\server.etl overwrite=yes"
do stuff and then
netsh trace stop
Hi,
May I know, where do you get lcow-initrd.img and lcow-kernel?
THanks