docs(suspend): record the older start path refusing a resumed snapshot

The older start path cannot resume a snapshot, so it now refuses to start a
VM that still holds a recoverable one instead of cold-starting over it. Say
so in the change entry and at the guard, where the reason stays next to the
code.
This commit is contained in:
Nwflower committed 2026-12-04 03:15:30 -07:00
1 parent 965e03ca34
commit e79c190cfe
2 files changed
+7 -2

No files matched your search

@@ -2,6 +2,6 @@
"group": "fixes",
"order": 0,
"authors": ["reiasu2", "Nwflower"],
"zh": "自动清理无法恢复的挂起残留,避免它们阻止再次挂起,并修复 Windows 上文件仍被短暂占用时挂起封存或清理失败的问题。挂起与恢复支持存放在长路径下的虚拟机。",
"en": "Clear orphaned suspend files that block later suspend attempts and avoid snapshot publication or cleanup failures when Windows files are briefly still in use. Suspend and resume also support VMs stored under long paths."
"zh": "自动清理无法恢复的挂起残留,避免它们阻止再次挂起,并修复 Windows 上文件仍被短暂占用时挂起封存或清理失败的问题。挂起与恢复支持存放在长路径下的虚拟机。已保存可恢复快照的虚拟机在启动时会改为拒绝并提示先恢复或放弃挂起状态,旧版启动入口同样适用,不再直接冷启动覆盖快照。",
"en": "Clear orphaned suspend files that block later suspend attempts and avoid snapshot publication or cleanup failures when Windows files are briefly still in use. Suspend and resume also support VMs stored under long paths. A VM that holds a recoverable snapshot now refuses to start and asks you to resume or discard that state first, including through the older start path, instead of cold-starting over the snapshot."
}
+5
View File
@@ -444,6 +444,11 @@ func (a *App) reconcileLegacyBridgeArgs(ctx context.Context, c networkControlCli
return nil
}
// prepareLegacyColdStart guards the older start path against a stopped VM that
// still holds suspend artifacts. It drops provably orphaned files, then refuses
// the start while a recoverable snapshot remains: this path cannot resume one,
// and cold-starting over it would discard the guest's saved state. Resume or
// discard the snapshot from the UI first.
func prepareLegacyColdStart(ctx context.Context, locale i18n.Locale, name, tmpDir string, cur reims.VMDetail, log func(string)) error {
if cur.State != "stopped" {
return nil