From 8e9d61d5f573c76b912cfb5b8c94e471f83c8869 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Wed, 4 Oct 2023 12:21:45 -0400 Subject: [PATCH] Validate that a suspendable VM doesn't have shared directories (#623) --- 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 8e5fbb5..230630e 100644 --- a/Sources/tart/Commands/Run.swift +++ b/Sources/tart/Commands/Run.swift @@ -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