[Bug] V2P: "Prepare VirtIO drivers" does not install the QEMU guest agent
Describe the bug
The dialog says the injection installs the full driver stack "(Storage, Network, Balloon, qemu-ga)". The first-boot service PegaProxFirstBoot runs virtio-win-gt-x64.msi only. That MSI contains the drivers; the guest agent is a separate package on the ISO (guest-agent\qemu-ga-x86_64.msi).
After the first boot C:\PegaProx\msi.log reports success and the drivers are bound (network, balloon, serial), but there is no QEMU guest agent service. Without the agent, qm guest exec (e.g. to set the IP on the new VirtIO NIC), clean shutdown and qm agent ping do not work, so it has to be installed by hand anyway.
Minor: C:\PegaProx\bootarm.log and service.log stay empty (0 bytes), although the sc config vioscsi start= boot and sc delete steps did take effect.
Note: tested with the RBD fix from #1245 applied locally, otherwise the injection does not run on RBD at all.
Steps to Reproduce
- Windows Server 2025 source, offline copy, "Prepare VirtIO drivers" on, virtio-win 0.1.302 ISO.
- Boot the migrated VM (on PVSCSI), let
PegaProxFirstBootrun and reboot. qm agent <vmid> ping→ "QEMU guest agent is not running"; no QEMU-GA service in Windows,Virtio-win-driver-installer0.1.302 installed.
Expected behavior
Also install guest-agent\qemu-ga-x86_64.msi from the ISO (as part of the injection or as a separate option), or remove qemu-ga from the dialog text.
Environment
- PegaProx Version: 1.4.1 (build 2026.10.24)
- Installation Method: Debian package (pegaprox 1.4.1-1)
- OS: Debian 13 (trixie)
- UI? Corporate
- Browser: Chrome (latest)
- Behind Reverse Proxy? No
- Source / Target: standalone ESXi 8.0U3 (VMFS6) → Proxmox VE 9, 3 nodes, Ceph RBD
Logs
[VirtIO] COPIED viostor, vioscsi, NetKVM, Balloon, pvpanic, vioserial, viorng (2k25/amd64)
[VirtIO] MSI_STAGED virtio-win-gt-x64.msi
[VirtIO] SVC_REGISTERED
[VirtIO] INJECTION_OK
msi.log (end):
Product: Virtio-win-driver-installer -- Configuration completed successfully.
MainEngineThread is returning 0
# qm agent 100 ping
QEMU guest agent is not running
Screenshots
n/a
Checklist
- [x] I have searched existing issues to make sure this is not a duplicate
- [x] I am using the latest version of PegaProx
- [x] I've put enough in here that someone can start on it without asking me three questions first
- [x] I understand PegaProx is maintained by volunteers in their free time. Nobody is on call, and writing URGENT doesn't get anyone out of bed 🪄
You're right about the mismatch. The first-boot service in pegaprox/core/v2p.py only runs virtio-win-gt-x64.msi, and a comment there assumes that MSI brings qemu-ga along, which your qm agent ping and the missing service contradict. So the dialog text promises something nothing in the injection does.
Whether to also run guest-agent\qemu-ga-x86_64.msi or just correct the text is noted for the maintainers. I can only go by your test here, I haven't checked the ISO's contents myself.
Jan-Philipp
Thanks! For reference, virtio-win-0.1.302.iso ships the agent as a separate package next to the driver MSI:
/virtio-win-gt-x64.msi
/guest-agent/qemu-ga-i386.msi
/guest-agent/qemu-ga-x86_64.msi
So running guest-agent\qemu-ga-x86_64.msi in the first-boot service after virtio-win-gt-x64.msi would match what the dialog promises.
After installing it by hand the service runs and qm agent ping answers.
That listing settles it, thanks. #1281 stages guest-agent/qemu-ga-x86_64.msi and runs it in the first-boot service after the driver MSI, both under start /wait so the second one doesn't collide with the first.
It isn't merged and hasn't met a real Windows guest yet, so a run in your lab would be the test that counts if you get to it.
Jan-Philipp
Ran #1281 on a real Windows guest (Server 2025, offline copy from ESXi 8.0U3g to PVE 9 with Ceph RBD, PVSCSI, "Prepare VirtIO drivers" on, virtio-win 0.1.302). The staging works, the guest agent install does not.
What happens
-
Injection:
INJECTION_OK, drivers copied,C:\PegaProx\qemu-ga-x86_64.msistaged, the first boot service runs. -
virtio-win-gt-x64.msiinstalls fine (msi.log). -
qemu-ga-x86_64.msi(110.2.3) fails,qemu-ga.log:Executing op: CustomActionSchedule(Action=RegisterCom,ActionType=3122,Source=rundll32.exe,Target="C:\Program Files\Qemu-ga\qga-vss.dll",DLLCOMRegister,) Note: 1: 1722 2: RegisterCom 3: rundll32.exe 4: "C:\Program Files\Qemu-ga\qga-vss.dll",DLLCOMRegister CustomAction RegisterCom returned actual error code -2147023841 Product: QEMU guest agent -- Error 1722. ... Action ended 09:23:15: InstallFinalize. Return value 3. ... Installation failed ... 1603-2147023841is0x8007041F, i.e. Win32 1055ERROR_SERVICE_DATABASE_LOCKED. The install rolls back, there is noQEMU-GAservice afterwards. -
After logging in, installing the very same MSI from the ISO by hand works, and
qm agent <vmid> pinganswers right away.
So it looks like the context, not the package: the VSS registration seems to need the service database while it is still locked during the boot-time service start (the first boot service runs cmd.exe as its ImagePath, which never reports running). That's my reading, I haven't proven the locking part. Running the agent install outside that window (e.g. a one-shot scheduled task as SYSTEM at startup, or after the service has reported running) might be worth a try.
Log, smaller thing: only the first MSI_STAGED line reaches the migration log, because MSI_STAGED isn't in the multi-line markers (COPIED, SKIP, COPY_FAILED), so MSI_STAGED qemu-ga-x86_64.msi is dropped. GUEST_AGENT_MSI_MISSING isn't in the marker list at all, so a missing agent MSI would not show up either.
Thanks for the lab run, the log excerpt makes this much easier to follow. The two log gaps you found are in #1331: every MSI_STAGED line now reaches the migration log, and GUEST_AGENT_MSI_MISSING has its own marker. The 1722 during RegisterCom is a separate problem in how the first boot service runs the agent install. It needs its own change and a test on a real Windows guest, so I've noted it for the maintainers, including your idea of a one-shot startup task.
Jan-Philipp
Thanks! Happy to test a fix for the first-boot install on a real Windows Server 2025 guest (same setup as P18/P19) once there is a PR.
Update from a retest on 1.5.0-1 (offline copy, unprepared Windows Server 2025, Ceph RBD target): the log now shows both "MSI_STAGED virtio-win-gt-x64.msi" and "MSI_STAGED qemu-ga-x86_64.msi", and after the first boot the QEMU-GA service is running without manual installation. From my side this looks resolved.
Thanks for retesting this on 1.5.0, and for all the lab runs before that. With both packages staged and the agent service up after the first boot, this one is done. If the agent install misbehaves on another Windows build, leave a note here.
Nico