Validate that a disk is not amd64 (#673)

To improve UX for cases like #672
This commit is contained in:
Fedor Korotkov 2023-11-28 09:55:34 -05:00 committed by GitHub
parent bad37b129c
commit bf03873c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -140,6 +140,12 @@ struct Run: AsyncParsableCommand {
throw ValidationError("Suspending VMs with shared directories is not supported")
}
}
for disk in disk {
if disk.hasSuffix("-amd64.iso") {
throw ValidationError("Seems you have a disk targeting x86 architecture (hence amd64 in the name). Please use an 'arm64' version of the disk.")
}
}
}
@MainActor