From db861a461790e5251cafa2beca8cd8b37e498ad7 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 23 Jun 2021 12:15:42 +0200 Subject: [PATCH] migrate prepare: make content type check generic to avoid false-positives, e.g., from a ISO on a ISO only storage. Signed-off-by: Thomas Lamprecht --- PVE/QemuMigrate.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 30c1c6fc..0d08bb28 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -345,9 +345,10 @@ sub prepare { $targetsid, $self->{node}, ); + my ($vtype) = PVE::Storage::parse_volname($storecfg, $volid); - die "content type 'images' is not available on storage '$targetsid'\n" - if !$target_scfg->{content}->{images}; + die "$volid: content type '$vtype' is not available on storage '$targetsid'\n" + if !$target_scfg->{content}->{$vtype}; if ($scfg->{shared}) { # PVE::Storage::activate_storage checks this for non-shared storages