From 5324ceffefca241e13c2267d11cd017726768a92 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Fri, 6 Nov 2020 15:30:55 +0100 Subject: [PATCH] fix #3030: always activate volumes in storage_migrate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AFAICT the snapshot activation is not necessary for our plugins at the moment, but it doesn't really hurt and might be relevant in the future or for external plugins. Deactivating volumes is up to the caller, because for example, for replication on a running guest, we obviously don't want to deactivate volumes. Suggested-by: Fabian Grünbichler Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 18eef46..932f0f1 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -709,6 +709,13 @@ sub storage_migrate { }; volume_snapshot($cfg, $volid, $snapshot) if $migration_snapshot; + + if (defined($snapshot)) { + activate_volumes($cfg, [$volid], $snapshot); + } else { + activate_volumes($cfg, [$volid]); + } + eval { if ($insecure) { my $input = IO::File->new();