]> git.proxmox.com Git - qemu-server.git/commitdiff
migration with targetstorage: check if target storage supports images
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 26 Mar 2020 08:09:32 +0000 (09:09 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 27 Mar 2020 13:32:42 +0000 (14:32 +0100)
This makes sure that live migration also respects content types.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/QemuMigrate.pm

index d91c5d1fe5a23b4098c484b4cf18d3ab91ea78a0..64b4c0ec5c685b7fb65427c380be0391642b7fc1 100644 (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