Skip to content

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

  1. Locate the VirtIO ISO drive letter:
Get-Volume | Select-Object DriveLetter, FileSystemLabel
  1. 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:

Set-Service QEMU-GA -StartupType Automatic
Start-Service QEMU-GA
  1. 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
  1. Validate from H1 after 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.

  1. Install PowerShell 7.6.3 through QEMU 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:

qm guest exec-status 4000 <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:

qm guest exec-status 4000 <PID>

The expected version is 7.6.3.

Validation

  • QEMU-GA is Running and Automatic.
  • qm guest cmd 4000 ping succeeds on Proxmox VE 9.
  • qm guest exec returns output from the guest.
  • 172.20.110.10 appears in guest interface data.
  • PowerShell 7.6.3 is installed and executable.
  • No step after guest-agent activation depends on RDP or WinRM as 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-GA
  • qm guest cmd 4000 get-osinfo
  • qm 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-T02 if the VM cannot reach a clean guest-exec state.