Expose per-VM details and stats on VmDomain (vCPUs, memory, disks, IPs, autostart, live usage)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with vms.model.ts and VmsService, which the issue identifies as the VM model and existing libvirt connection entry point. Review the current VmDomain fields and how vm.start and vm.stop use that connection. Done means exposing the requested per-VM configuration, disk, network and uptime details, with optional live stats and nullable IPs; the issue does not name tests to run.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem?
VmDomain exposes only id, name and state (uuid was added on main). A client can list VMs and start or stop them, but it can't show anything about a VM: how many vCPUs or how much memory it has, its disks, its IP address, whether it autostarts, or how busy it is. Docker containers get far more (image, status, ports and mounts, plus dockerContainerStats for live CPU and memory), so remote clients can show a useful container detail view but not a VM one.
I'm building an Android remote for Unraid (urrt) on the official API, and the VM tab can't go beyond a name, a state pill and action buttons.
Describe the solution you'd like
Add fields to VmDomain, all of which libvirt already provides on the server:
- Configuration (from the domain XML /
virDomainGetInfo):vcpus,memoryandmaxMemory(bytes),autostart,osType/machine, and the template icon (as the webGUI shows). - Disks: a list of
{ target (vda), source path, bus, capacity, allocation }(virDomainGetBlockInfo). - Network: a list of
{ mac, model, bridge or network, ipAddresses }, where the guest agent or DHCP lease reports them (virDomainInterfaceAddresses). - Live stats (optional, e.g. a
vmStatssubscription mirroringdockerContainerStats): CPU percent, memory in use, disk read/write and network rx/tx bytes per second (virConnectGetAllDomainStats/virDomainGetCPUStats). - Uptime / last state change, if available.
Everything can be nullable, so a VM without a guest agent simply returns null for its IPs.
Describe alternatives you've considered
- Reading the webGUI's VM pages: needs a browser session, not an API key, and isn't a stable interface.
- A companion plugin calling
virshon the server: works, but asks every user to install and trust another service for data the API process already has access to. - SSH from the client: not acceptable for a phone app.
Additional context
- Related, not duplicate: #2036 adds a server-wide memory breakdown that includes VMs as a whole; this asks for per-VM detail.
- Mutations like
vm.startandvm.stopalready use the same libvirt connection (VmsService), so the data is one call away. - Read access could stay behind the existing
VMS:READ_ANYpermission.
Environment (if relevant)
Unraid OS Version: 7.3.3 and 7.4.0-rc.1 (API 4.37.5); fields checked by schema introspection and in vms.model.ts on main.
Pre-submission Checklist
- I have searched existing issues to ensure this feature hasn't already been requested
- This is not an Unraid Connect related feature (if it is, please submit via the support form instead)
- I have provided clear examples or use cases for the feature
- Ngôn ngữ chính
- TypeScript
- Star
- 115
- Fork
- 23
- Merge trung bình
- 4 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unraid/api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
paperclipai/paperclip#17151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
AgoraIO-Extensions/agent-infra#3159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
blocklist addition
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
MetaMask/eth-phishing-detect#304596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
friction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLiteCó thể đã có người làm @NdekoCode đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ever-co/ever-gauzy#11214 ·
Maintainer thường phản hồi trong vòng 1 ngày