P02-T03 - QEMU Guest Agent and Base Tooling
Objective
Install QEMU Guest Agent, install remaining VirtIO guest tools, validate remote execution from Proxmox, and install PowerShell 7.6.3 into the golden image.
Once QEMU Guest Agent is responding, every command in this phase must run through qm guest exec or qm guest cmd. Do not assume RDP or WinRM are available or usable as management channels at this point.
This is an image-engineering exception to the normal server operations model. QGA is the transport only; reusable Windows validation logic is maintained as PowerShell in /scripts.
Inputs
| Key | Value |
|---|---|
| VMID | 4000 |
| VirtIO ISO | virtio-win.iso |
| Build IP | 172.20.110.10 |
| PowerShell target version | 7.6.3 |
Prechecks
- Complete
P02-T02. - Sign in to Windows as local administrator.
- Open PowerShell as administrator.
Execution
- Locate the VirtIO ISO drive letter:
- Install
QEMU Guest Agent:
$VirtioDrive = 'E:'
$Installer = Join-Path $VirtioDrive 'guest-agent\qemu-ga-x86_64.msi'
if (-not (Test-Path $Installer)) {
throw "QEMU Guest Agent installer not found at $Installer"
}
Start-Process msiexec.exe `
-ArgumentList "/i `"$Installer`" /qn /norestart" `
-Wait `
-NoNewWindow
Get-Service QEMU-GA
If needed:
- Install remaining VirtIO guest tools:
$VirtioDrive = 'E:'
$DriverPath = Join-Path $VirtioDrive 'virtio-win-gt-x64.msi'
if (-not (Test-Path $DriverPath)) {
throw "VirtIO guest tools installer not found at $DriverPath"
}
Start-Process msiexec.exe `
-ArgumentList "/i `"$DriverPath`" /qn /norestart" `
-Wait `
-NoNewWindow
Restart-Computer
- Validate from
H1after reboot:
qm guest cmd 4000 ping
qm guest cmd 4000 get-osinfo
qm guest cmd 4000 network-get-interfaces
qm guest exec 4000 -- powershell.exe -NoProfile -Command "hostname; Get-Service QEMU-GA | Select-Object Status,Name,StartType"
qm guest exec-status 4000 <PID>
The network interfaces output should include 172.20.110.10.
- Install
PowerShell 7.6.3throughQEMU Guest Agent.
For Windows Server and enterprise deployment scenarios, Microsoft documents the MSI package as the preferred installation method. This guide validates PowerShell-7.6.3-win-x64.msi.
Download the MSI inside the guest:
qm guest exec 4000 -- \
powershell.exe \
-NoProfile \
-ExecutionPolicy Bypass \
-Command "\
New-Item -ItemType Directory -Path 'C:\Temp' -Force | Out-Null; \
curl.exe -L 'https://github.com/PowerShell/PowerShell/releases/download/v7.6.3/PowerShell-7.6.3-win-x64.msi' -o 'C:\Temp\PowerShell-7.6.3-win-x64.msi'; \
Get-Item 'C:\Temp\PowerShell-7.6.3-win-x64.msi' | Select-Object FullName,Length"
Collect the result if the command returns a PID:
Install the MSI silently:
qm guest exec 4000 -- \
powershell.exe \
-NoProfile \
-ExecutionPolicy Bypass \
-Command "\
\$Arguments=@('/i','C:\Temp\PowerShell-7.6.3-win-x64.msi','/qn','/norestart','ADD_PATH=1','ENABLE_PSREMOTING=1','REGISTER_MANIFEST=1','USE_MU=1','ENABLE_MU=1','DISABLE_TELEMETRY=1'); \
\$Result=Start-Process msiexec.exe -ArgumentList \$Arguments -Wait -PassThru -NoNewWindow; \
Write-Output \"PowerShell MSI exit code: \$($Result.ExitCode)\"; \
if (\$Result.ExitCode -ne 0) { exit \$Result.ExitCode }"
Validate the installed version through the guest channel:
qm guest exec 4000 -- \
powershell.exe \
-NoProfile \
-ExecutionPolicy Bypass \
-Command "& 'C:\Program Files\PowerShell\7\pwsh.exe' -NoProfile -Command '$PSVersionTable.PSVersion.ToString()'"
If needed, read the result with:
The expected version is 7.6.3.
Validation
QEMU-GAisRunningandAutomatic.qm guest cmd 4000 pingsucceeds on Proxmox VE 9.qm guest execreturns output from the guest.172.20.110.10appears in guest interface data.PowerShell 7.6.3is installed and executable.- No step after guest-agent activation depends on
RDPorWinRMas the command path.
Lab evidence on July 18, 2026 confirmed that a fresh clone of 4000 starts QGA and reports PowerShell 7.6.3. Final image acceptance remains governed by P02-T04 because that same clone exposed a persistent build-network route.
Evidence
Get-Service QEMU-GAqm guest cmd 4000 get-osinfoqm guest cmd 4000 network-get-interfaces- Output showing the MSI exists at
C:\Temp\PowerShell-7.6.3-win-x64.msi - Output showing
PowerShell MSI exit code: 0 - PowerShell version output from
C:\Program Files\PowerShell\7\pwsh.exe
Rollback
- Reinstall guest agent or VirtIO tools if the guest channel is unstable.
- Rebuild from
P02-T02if the VM cannot reach a clean guest-exec state.