vm.stop force-kills the guest after 10 seconds; vm.reboot can leave a slow guest off
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- graphql, typescript
Hướng nghiên cứu
Start in api/src/unraid-api/graph/resolvers/vms/vms.service.ts, especially VmsService.setVmState, waitForDomainShutdown, and rebootVm; trace how the stop and reboot mutations handle libvirt shutdown requests and timeouts. The issue reports a 10-second polling limit followed by domain.destroy() for stop and an error for reboot. Done means slow guest shutdowns are not unexpectedly force-killed or left off after a failed reboot, while forceStop remains the hard-stop path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
Unraid OS Version: 7.4.0-rc.1 (API 4.37.5); the code is unchanged on main as of 2026-10-17.
Are you using a reverse proxy? No. Tested against the server directly.
Pre-submission Checklist
- I have verified that my Unraid OS is up to date
- I have tested this issue by accessing my server directly (not through a reverse proxy)
- This is not an Unraid Connect related issue (if it is, please submit via the support form instead)
Issue Description
vm.stop is the graceful stop (vm.forceStop is the hard one), but it doesn't stay graceful. In VmsService.setVmState (api/src/unraid-api/graph/resolvers/vms/vms.service.ts), stopping calls domain.shutdown() and then waitForDomainShutdown(), which polls 10 times at 1 second (maxRetries = 10). If the guest is not off by then, it calls domain.destroy(). Any guest that takes more than 10 seconds to shut down is powered off: Windows installing updates, Home Assistant OS, a database VM flushing to disk. The client is told the stop succeeded.
vm.reboot (rebootVm) sends the same domain.shutdown() and waits the same 10 seconds. If the guest is not off by then, it throws "Graceful shutdown failed, please force stop the VM and try again". The guest has already received the shutdown request, though, so a slow guest goes on shutting down and ends up off, not rebooted, while the client was told the reboot failed.
Steps to Reproduce
- Create a VM with no OS (nothing answers the ACPI shutdown).
- Start it, then call
mutation { vm { stop(id: "<id>") } }. - Start it again, then call
mutation { vm { reboot(id: "<id>") } }.
Expected Behavior
stopshould not destroy the domain. libvirt'sshutdown()doesn't time out on its own, sostopcould return once the request is sent, or wait longer and then return an error or a "still shutting down" result. Leave the hard stop toforceStop. A configurable or much longer timeout would also work.rebootcould usedomain.reboot()(libvirt's guest reboot), or keep waiting until the guest is off before starting it again.
Actual Behavior
- Step 2:
stopreturnedtrueafter about 10.3 s, and the domain was SHUTOFF (destroyed). - Step 3:
rebootfailed after about 10 s with the message above. The VM stayed running only because nothing inside it reacted; a real guest would have gone on shutting down.
Additional Context
Mobile and remote clients present stop as the safe option next to "force stop", and users pick it precisely to avoid data loss. Our Android client now warns users about the 10-second power cut.
- 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
-
Expose per-VM details and stats on VmDomain (vCPUs, memory, disks, IPs, autostart, live usage)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
unraid/api#2113 · 1 bình luận ·
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 68/100
maniator/verticopolis#1303 · 1 bình luận ·
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 73/100
components-web-app/docs#297 ·
-
listFeatures/getFeatureExamples never return Kotlin examples for Android or server Kotlin SDKsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
appwrite/mcp-for-docs#23 · 1 bình luận ·
-
`@vanilla-extract/turbopack-plugin`: "getImageSize is not a function" with Next.js 16.4.x when a `.css.ts` file imports an imageCó thể đã có người làm @aevarOrigo đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vanilla-extract-css/vanilla-extract#1799 · 1 bình luận ·
-
native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
prime-radiant-inc/evener#4839 ·
Maintainer thường phản hồi trong vòng 1 ngày