diff --git a/changes/fix-suspend-stale-tmp-and-seal-retry.json b/changes/fix-suspend-stale-tmp-and-seal-retry.json index a6c4221..375216c 100644 --- a/changes/fix-suspend-stale-tmp-and-seal-retry.json +++ b/changes/fix-suspend-stale-tmp-and-seal-retry.json @@ -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." } diff --git a/internal/app/macos_lifecycle_native.go b/internal/app/macos_lifecycle_native.go index afd8343..bd97097 100644 --- a/internal/app/macos_lifecycle_native.go +++ b/internal/app/macos_lifecycle_native.go @@ -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