Commit 837369d4 authored by Stefan Scherer's avatar Stefan Scherer
Browse files

Nested hypervisor, use bootcommand as workaround for product key popup

parent bfa6a11f
......@@ -66,7 +66,7 @@
<!-- Do not uncomment the Key element if you are using trial ISOs -->
<!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs -->
powershell.exe -Command "Install-WindowsFeature -Name Containers"
powershell.exe -Command "Install-WindowsFeature -Name Hyper-V"
shutdown /r /t 5 /f /d p:4:1 /c "Reboot for Containters"
net stop winrm
powershell.exe -Command "wget -uri -OutFile C:\ContainerSetup.ps1"
powershell.exe -Command "wget -uri -OutFile C:\Install-ContainerHost-1.ps1"
set LOCALWIMPATH=C:\Users\vagrant\ContainerOSImage.wim
rem patch the install script, see
powershell.exe -Command "cat C:\Install-ContainerHost-1.ps1 | %%{$_ -replace 'qfe =','qfe = 0 #'} | Set-Content C:\Install-ContainerHost.ps1"
if "%WIMPATH%x"=="x" (
powershell.exe -File "C:\ContainerSetup.ps1"
) else (
powershell.exe -Command "wget -uri %WIMPATH% -OutFile %LOCALWIMPATH%"
if not exist %LOCALWIMPATH% (
echo Waiting for WimPath %LOCALWIMPATH%
ping -n 5 > nul
goto waiting
if exist %LOCALWIMPATH% (
powershell.exe -File "C:\ContainerSetup.ps1" -WimPath %LOCALWIMPATH%
) else (
powershell.exe -File "C:\ContainerSetup.ps1"
powershell.exe -File "C:\Install-ContainerHost.ps1" -HyperV
echo Done with %0
echo Sleeping for another minute
ping -n 60 >nul: 2>nul:
echo Sleeping until internet is available
@setlocal enableextensions enabledelayedexpansion
@echo off
set ipaddr=
set state=down
for /f "tokens=5,7" %%a in ('ping -n 1 !ipaddr!') do (
if "x%%a"=="xReceived" if "x%%b"=="x1," set state=up
echo.Link is !state!
ping -n 5 >nul: 2>nul:
if "%state%"=="down" goto :loop
......@@ -6,7 +6,8 @@
"iso_checksum_type": "md5",
"iso_checksum": "935ba77651210bd1bd71a114c92b0caa",
"headless": false,
"boot_wait": "2m",
"boot_wait": "6m",
"boot_command": [ "<tab><enter>" ],
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "6h",
......@@ -27,7 +28,9 @@
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
"scsi0.virtualDev": "lsisas1068",
"vhv.enable": "TRUE",
"hypervisor.cpuid.v0": "FALSE"
......@@ -76,6 +79,8 @@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment