{% for L in ['D','E','F','G'] %}
{{ L }}:\viostor\{{ win_vm_virtio_ver }}\amd64
{{ L }}:\NetKVM\{{ win_vm_virtio_ver }}\amd64
{% endfor %}
{{ win_vm_ui_language }}
{{ win_vm_input_locale }}
{{ win_vm_system_locale }}
{{ win_vm_ui_language }}
{{ win_vm_user_locale }}
OnError
0
true
1EFI260
2MSR16
3Primarytrue
11FAT32
22
33NTFSC
03
/IMAGE/INDEX{{ win_vm_image_index }}
{{ win_vm_gvlk }}OnError
true
Administrator
ddupan
{{ win_vm_name }}
{{ win_vm_input_locale }}
{{ win_vm_system_locale }}
{{ win_vm_ui_language }}
{{ win_vm_user_locale }}
true
true
true
true
Work
3
true
true
{{ win_vm_timezone }}
{{ win_vm_admin_password }}
true
true
1
Administrator
{{ win_vm_admin_password }}true
1
Static IP + DNS
powershell -NoProfile -ExecutionPolicy Bypass -Command "$i=(Get-NetAdapter | Where-Object Status -eq 'Up' | Select-Object -First 1).ifIndex; New-NetIPAddress -InterfaceIndex $i -IPAddress {{ win_vm_ip }} -PrefixLength {{ win_vm_prefix }} -DefaultGateway {{ win_vm_gateway }}; Set-DnsClientServerAddress -InterfaceIndex $i -ServerAddresses {{ win_vm_dns }}"
2
Enable WinRM + HTTPS listener (self-signed)
powershell -NoProfile -ExecutionPolicy Bypass -Command "Enable-PSRemoting -Force; $c=New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation Cert:\LocalMachine\My; New-Item -Path WSMan:\localhost\Listener -Address * -Transport HTTPS -CertificateThumbPrint $c.Thumbprint -Force"
3
Firewall: allow WinRM HTTPS 5986
powershell -NoProfile -ExecutionPolicy Bypass -Command "New-NetFirewallRule -DisplayName 'WinRM HTTPS' -Direction Inbound -Protocol TCP -LocalPort 5986 -Action Allow"
4
Enable Remote Desktop + firewall group
powershell -NoProfile -ExecutionPolicy Bypass -Command "Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections -Value 0; Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication -Value 1; Enable-NetFirewallRule -Group '@FirewallAPI.dll,-28752'"
5
Install virtio-win guest tools (drivers + QEMU guest agent + balloon)
powershell -NoProfile -ExecutionPolicy Bypass -Command "$e=(Get-PSDrive -PSProvider FileSystem | ForEach-Object { Join-Path $_.Root 'virtio-win-guest-tools.exe' } | Where-Object { Test-Path $_ } | Select-Object -First 1); if ($e) { Start-Process $e -ArgumentList '/install','/quiet','/norestart' -Wait }"