vm.stop force-kills the guest after 10 seconds; vm.reboot can leave a slow guest off
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- graphql, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 115
- フォーク
- 23
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
unraid/api のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
createAI: the ai peer range allows ai@6, which the provider cannot work with対応中かも @akhil9tiet が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
cloudflare/agents#2690 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[fullsend] E2E: theme — global-header ignores app.branding.fullLogo (RHDHBUGS-3670)対応中かも @fullsend-ai-coder が今日担当しました。 オープンe2e-failure ready-to-code
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
redhat-developer/rhdh-plugin-export-overlays#4503 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs triage 📥
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
ethereum/ethereum-org-website#19601 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
cloudscape-design/components#5184 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
agilepathway/label-checker#805 ·
メンテナーはふだん 1 日以内に返信