From bf03873c8d829366166d1115275df2f269dc510a Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Tue, 28 Nov 2023 09:55:34 -0500 Subject: [PATCH] Validate that a disk is not amd64 (#673) To improve UX for cases like #672 --- Sources/tart/Commands/Run.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/tart/Commands/Run.swift b/Sources/tart/Commands/Run.swift index 50e1686..4f06c52 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -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