Validate that a suspendable VM doesn't have shared directories (#623)

This commit is contained in:
Fedor Korotkov 2023-10-04 12:21:45 -04:00 committed by GitHub
parent 71d03226fe
commit 8e9d61d5f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -126,6 +126,12 @@ struct Run: AsyncParsableCommand {
if try vmDir.state() == "suspended" {
suspendable = true
}
if suspendable {
if dir.count > 0 {
throw ValidationError("Suspending VMs with shared directories is not supported")
}
}
}
@MainActor