This makes sure that live migration also respects content types.

Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---
 PVE/QemuMigrate.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 9cff64d..f2be2a6 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -282,6 +282,12 @@ sub sync_disks {
 
     my $override_targetsid = $self->{opts}->{targetstorage};
 
+    if (defined($override_targetsid)) {
+       my $scfg = PVE::Storage::storage_config($self->{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
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to