[pve-devel] [PATCH v4 qemu-server 02/27] migration with targetstorage: check if target storage supports images

Fabian Ebner f.ebner at proxmox.com
Thu Mar 26 09:09:32 CET 2020


This makes sure that live migration also respects content types.

Signed-off-by: Fabian Ebner <f.ebner at 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





More information about the pve-devel mailing list