bootstrap: install the VirtIO serial driver before the agent

qemu-ga-x86_64.msi installs the service but not vioserial. The service then
starts without a channel and Proxmox reports "guest agent is not running",
so provisioning never gets past backend_ready. Install vioser.inf from the
virtio CD first, then enable and start the service.
This commit is contained in:
2026-10-26 12:40:10 -04:00
parent 4dc27a4208
commit 0189330117
@@ -68,9 +68,24 @@ try {
Where-Object { $_.FileSystemLabel -like 'virtio-win*' -and $_.DriveLetter } |
Select-Object -First 1
if ($virtio) {
# The agent MSI does not install the VirtIO serial driver. Without it
# the service starts but never connects to the channel, and Proxmox
# shows "guest agent is not running", which blocks provisioning.
$vioser = Get-ChildItem "$($virtio.DriveLetter):\vioserial" -Recurse -Filter 'vioser.inf' `
-ErrorAction SilentlyContinue |
Where-Object { $_.FullName -match 'amd64' } | Select-Object -First 1
if ($vioser) {
$null = pnputil.exe /add-driver $vioser.FullName /install
Write-Host "bootstrap: vioser driver installed from $($vioser.FullName)"
} else {
Write-Host 'bootstrap: vioser.inf not found on the virtio CD'
}
$msi = "$($virtio.DriveLetter):\guest-agent\qemu-ga-x86_64.msi"
if (Test-Path $msi) {
Start-Process msiexec.exe -ArgumentList "/i `"$msi`" /qn /norestart" -Wait
Set-Service -Name QEMU-GA -StartupType Automatic -ErrorAction SilentlyContinue
Start-Service -Name QEMU-GA -ErrorAction SilentlyContinue
Write-Host 'bootstrap: qemu guest agent installed'
} else {
Write-Host 'bootstrap: virtio-win mounted but qemu-ga msi not found'