From 95015dbbf24b710011965805e689c03923fb830c Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Thu, 26 Mar 2020 09:09:31 +0100 Subject: [PATCH] storage_migrate: check if target storage supports content type Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index fcfc6af..60b8310 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -575,6 +575,11 @@ sub storage_migrate { my $tcfg = storage_config($cfg, $target_storeid); + my $vtype = (parse_volname($cfg, $volid))[0]; + + die "content type '$vtype' is not available on storage '$target_storeid'\n" + if !$tcfg->{content}->{$vtype}; + my $target_volid = "${target_storeid}:${target_volname}"; my $target_ip = $target_sshinfo->{ip}; -- 2.39.2