Skip to content

fix(api): parse compound QEMU agent settings - #148

Open
oechsler wants to merge 1 commit into
devnullvoid:masterfrom
oechsler:fix/parse-qemu-agent-options
Open

fix(api): parse compound QEMU agent settings#148
oechsler wants to merge 1 commit into
devnullvoid:masterfrom
oechsler:fix/parse-qemu-agent-options

Conversation

@oechsler

@oechsler oechsler commented Aug 13, 2026

Copy link
Copy Markdown

I found this while configuring pvetui for my homelab.

My Proxmox VMs are NixOS guests. The QEMU Guest Agent is enabled in the VM configuration and the service is enabled in NixOS with services.qemuGuest.enable = true. The agent is working: qm agent <VMID> ping succeeds and qm agent <VMID> network-get-interfaces returns the correct guest IP address.

However, pvetui showed the Guest Agent as disabled and did not display any IP address for these guests.

The Proxmox API returns the agent setting in this form:

agent: enabled=1,fstrim_cloned_disks=0,type=virtio

In GetVmStatus, pvetui compared the complete string only with "1" and "true". As a result, it treated the agent as disabled and never queried the guest-agent network interfaces.

This change reuses the existing parseQEMUAgentEnabled helper, which already handles compound Proxmox values correctly in the VM configuration path.

I tested this with my actual Proxmox/NixOS setup and with:

  • go test ./pkg/api
  • go test ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant