storage_migrate: check if target storage supports content type

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner
2020-03-26 09:09:31 +01:00
committed by Fabian Grünbichler
parent e6f4eed435
commit 95015dbbf2

View File

@ -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};