From 0189330117c0d635f916cc65e14d3c2f04bf3481 Mon Sep 17 00:00:00 2001 From: Mathieu Moran Date: Mon, 26 Oct 2026 12:40:10 -0400 Subject: [PATCH] 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. --- session1/content/seed/payload/bootstrap.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/session1/content/seed/payload/bootstrap.ps1 b/session1/content/seed/payload/bootstrap.ps1 index 505394f..d1bb61a 100644 --- a/session1/content/seed/payload/bootstrap.ps1 +++ b/session1/content/seed/payload/bootstrap.ps1 @@ -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'