feat(vm-summary): show guest hostname and OS from QEMU guest agent#57
Open
ry-ops wants to merge 1 commit intoPegaProx:mainfrom
Open
feat(vm-summary): show guest hostname and OS from QEMU guest agent#57ry-ops wants to merge 1 commit intoPegaProx:mainfrom
ry-ops wants to merge 1 commit intoPegaProx:mainfrom
Conversation
Implements the approved feature request in issue PegaProx#50. Backend (pegaprox_multi_cluster.py): - Add `ProxmoxManager.get_guest_info(node, vmid)` which calls the PVE guest agent endpoints: - `/nodes/{node}/qemu/{vmid}/agent/get-host-name` - `/nodes/{node}/qemu/{vmid}/agent/get-osinfo` Returns `{hostname, os_pretty_name}` with null values when the agent is unavailable or the VM is stopped — callers handle this gracefully. - Add Flask route `GET /api/clusters/<id>/vms/<node>/qemu/<vmid>/guest-info` protected by `vm.view` permission. Frontend (web/index.html): - Fetch guest info in `VmDetailPanel` via a `useEffect` that fires when a running QEMU VM is selected; result is stored in `guestInfo` state. - Render a new info row beneath the CPU/RAM/Disk/Uptime metric cards showing Hostname and OS side-by-side. Row is hidden when both values are null (agent not running, LXC container, or VM stopped). - Add translation keys `guestHostname` / `guestOsName` for EN and DE. Fixes PegaProx#50 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the approved feature request from #50.
Admins can now see the guest hostname and OS pretty-name (e.g.
Ubuntu 22.04.3 LTS) directly in the VM Summary panel without opening a console or SSH session — useful for identifying VMs and checking patch levels at a glance.Backend (
pegaprox_multi_cluster.py)ProxmoxManager.get_guest_info(node, vmid)method — calls two PVE guest agent endpoints:GET /nodes/{node}/qemu/{vmid}/agent/get-host-nameGET /nodes/{node}/qemu/{vmid}/agent/get-osinfo{hostname, os_pretty_name}withnullvalues when the agent is unavailable; errors are logged at DEBUG level so they don't spam logs for stopped VMsGET /api/clusters/<id>/vms/<node>/qemu/<vmid>/guest-info(requiresvm.view)Frontend (
web/index.html)VmDetailPanelfetches guest info on mount when the selected VM is a running QEMU VMnull— no visual noise for LXCs, stopped VMs, or VMs without the guest agentguestHostname/guestOsNamefor both EN and DETest plan
qemu-guest-agentinstalled — Hostname and OS row appears below metrics🤖 Generated with Claude Code