[PR #57] feat(vm-summary): show guest hostname and OS from QEMU guest agent #95

Open
opened 2026-03-02 15:47:53 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/PegaProx/project-pegaprox/pull/57
Author: @ry-ops
Created: 2/21/2026
Status: 🔄 Open

Base: mainHead: feat/vm-summary-guest-info


📝 Commits (1)

  • 1bef3b7 feat(vm-summary): show guest hostname and OS from QEMU guest agent

📊 Changes

2 files changed (+75 additions, -5 deletions)

View changed files

📝 pegaprox_multi_cluster.py (+70 -1)
📝 web/index.html (+5 -4)

📄 Description

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)

  • New ProxmoxManager.get_guest_info(node, vmid) method — calls two PVE guest agent endpoints:
    • GET /nodes/{node}/qemu/{vmid}/agent/get-host-name
    • GET /nodes/{node}/qemu/{vmid}/agent/get-osinfo
  • Returns {hostname, os_pretty_name} with null values when the agent is unavailable; errors are logged at DEBUG level so they don't spam logs for stopped VMs
  • New Flask route: GET /api/clusters/<id>/vms/<node>/qemu/<vmid>/guest-info (requires vm.view)

Frontend (web/index.html)

  • VmDetailPanel fetches guest info on mount when the selected VM is a running QEMU VM
  • A new info row is rendered below the CPU/RAM/Disk/Uptime cards, showing Hostname and OS side-by-side
  • The row is hidden entirely when both values are null — no visual noise for LXCs, stopped VMs, or VMs without the guest agent
  • Added translation keys guestHostname / guestOsName for both EN and DE

Test plan

  • Select a running QEMU VM with qemu-guest-agent installed — Hostname and OS row appears below metrics
  • Select a stopped QEMU VM — guest info row is hidden
  • Select an LXC container — guest info row is hidden
  • Select a running QEMU VM without guest agent — row is hidden (API returns nulls gracefully)
  • Verify EN and DE language labels render correctly

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/PegaProx/project-pegaprox/pull/57 **Author:** [@ry-ops](https://github.com/ry-ops) **Created:** 2/21/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/vm-summary-guest-info` --- ### 📝 Commits (1) - [`1bef3b7`](https://github.com/PegaProx/project-pegaprox/commit/1bef3b7328c417823e2e41470667d2ddf9b13b8e) feat(vm-summary): show guest hostname and OS from QEMU guest agent ### 📊 Changes **2 files changed** (+75 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `pegaprox_multi_cluster.py` (+70 -1) 📝 `web/index.html` (+5 -4) </details> ### 📄 Description ## 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`) - New `ProxmoxManager.get_guest_info(node, vmid)` method — calls two PVE guest agent endpoints: - `GET /nodes/{node}/qemu/{vmid}/agent/get-host-name` - `GET /nodes/{node}/qemu/{vmid}/agent/get-osinfo` - Returns `{hostname, os_pretty_name}` with `null` values when the agent is unavailable; errors are logged at DEBUG level so they don't spam logs for stopped VMs - New Flask route: `GET /api/clusters/<id>/vms/<node>/qemu/<vmid>/guest-info` (requires `vm.view`) ### Frontend (`web/index.html`) - `VmDetailPanel` fetches guest info on mount when the selected VM is a running QEMU VM - A new info row is rendered **below the CPU/RAM/Disk/Uptime cards**, showing Hostname and OS side-by-side - The row is **hidden entirely** when both values are `null` — no visual noise for LXCs, stopped VMs, or VMs without the guest agent - Added translation keys `guestHostname` / `guestOsName` for both **EN** and **DE** ## Test plan - [ ] Select a running QEMU VM with `qemu-guest-agent` installed — Hostname and OS row appears below metrics - [ ] Select a stopped QEMU VM — guest info row is hidden - [ ] Select an LXC container — guest info row is hidden - [ ] Select a running QEMU VM without guest agent — row is hidden (API returns nulls gracefully) - [ ] Verify EN and DE language labels render correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/project-pegaprox-PegaProx#95
No description provided.