Resume suspended VMs without explicit --suspendable flag (#540)

This commit is contained in:
Fedor Korotkov
2023-07-07 11:38:31 +04:00
committed by GitHub
parent 2014de7dac
commit d2ed4ef801
+6
View File
@@ -108,6 +108,12 @@ struct Run: AsyncParsableCommand {
if graphics && noGraphics {
throw ValidationError("--graphics and --no-graphics are mutually exclusive")
}
let localStorage = VMStorageLocal()
let vmDir = try localStorage.open(name)
if try vmDir.state() == "suspended" {
suspendable = true
}
}
@MainActor