mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-20 07:31:39 +01:00
An unattended install of the Windows 11 evaluation ISO under QEMU with nested KVM on WSL2, and a boot script that times the golden image to a desktop. Measured: install 21.6 min, desktop in 36 to 51 s, with other VMs running. W0.md records the numbers and what was found on the way: no SMM under nested SVM, so no secure-boot OVMF; the firmware needs TPM support for Setup to see the TPM; and the evaluation reads as expired unless the guest clock is set back.
30 lines
1.3 KiB
PowerShell
30 lines
1.3 KiB
PowerShell
# First-logon provisioning for the e2e golden image. Runs from the answer
|
|
# file ISO; finishes by shutting the guest down so the host sees it exit.
|
|
$ErrorActionPreference = 'Continue'
|
|
$log = 'C:\e2e-setup.log'
|
|
function Log($m) { "$(Get-Date -Format o) $m" | Add-Content $log }
|
|
Log 'setup start'
|
|
|
|
# no UAC prompts, no lock screen, no screensaver, no display or sleep timeout
|
|
Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' EnableLUA 0
|
|
New-Item -Force 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization' |
|
|
New-ItemProperty -Name NoLockScreen -Value 1 -Force | Out-Null
|
|
New-Item -Force 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' |
|
|
New-ItemProperty -Name DisableLockWorkstation -Value 1 -Force | Out-Null
|
|
Set-ItemProperty 'HKCU:\Control Panel\Desktop' ScreenSaveActive 0
|
|
powercfg /x -monitor-timeout-ac 0
|
|
powercfg /x -standby-timeout-ac 0
|
|
powercfg /h off
|
|
|
|
# no Defender real-time scanning, no Windows Update
|
|
Set-MpPreference -DisableRealtimeMonitoring $true
|
|
New-Item -Force 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' |
|
|
New-ItemProperty -Name DisableAntiSpyware -Value 1 -Force | Out-Null
|
|
foreach ($s in 'wuauserv', 'UsoSvc', 'WaaSMedicSvc') {
|
|
Stop-Service $s -Force -ErrorAction SilentlyContinue
|
|
Set-Service $s -StartupType Disabled -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
Log 'setup done'
|
|
shutdown /s /t 5
|