From a3733250418f90d1157a5e234a9fe1b19f323924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 20 Mar 2025 02:33:34 -0400 Subject: [PATCH] incusd/cluster/evacuate: Don't live-migrate stopped instances MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- cmd/incusd/api_cluster_evacuation.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/incusd/api_cluster_evacuation.go b/cmd/incusd/api_cluster_evacuation.go index 9cc1e8fb47d..f83a59e6a52 100644 --- a/cmd/incusd/api_cluster_evacuation.go +++ b/cmd/incusd/api_cluster_evacuation.go @@ -227,6 +227,9 @@ func evacuateInstancesFunc(ctx context.Context, inst instance.Instance, opts eva // Done with this instance. return nil } + } else if !isRunning { + // Can't live migrate if we're stopped. + action = "migrate" } // Find a new location for the instance.