]> git.proxmox.com Git - pve-storage.git/commitdiff
storage_migrate: check if target storage supports content type
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 26 Mar 2020 08:09:31 +0000 (09:09 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 27 Mar 2020 13:04:09 +0000 (14:04 +0100)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm

index fcfc6afc67f2f82d3a66e8e76048df7c54f42616..60b831090130b81ea394b8656bfccc1b5ed3c554 100755 (executable)
@@ -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};