migration with targetstorage: check if target storage supports images

This makes sure that live migration also respects content types.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2020-03-26 09:09:32 +01:00 committed by Fabian Grünbichler
parent 2cd808d331
commit 5c50a84f23

View File

@ -283,6 +283,12 @@ sub sync_disks {
my $storecfg = $self->{storecfg};
my $override_targetsid = $self->{opts}->{targetstorage};
if (defined($override_targetsid)) {
my $scfg = PVE::Storage::storage_config($storecfg, $override_targetsid);
die "content type 'images' is not available on storage '$override_targetsid'\n"
if !$scfg->{content}->{images};
}
eval {
# found local volumes and their origin