[pve-devel] [PATCH qemu-server] allow migration of local qcow2 snapshots

Dominik Csapak d.csapak at proxmox.com
Mon Dec 5 11:21:15 CET 2016


we can migrate local snapshots when on zfs or dir storage with qcow2,
but the check was incorrect

we checked for if (zfs && !qcow2) instead of  if (zfs || qcow2)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/QemuMigrate.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 8a65fe6..76ae55e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -313,7 +313,7 @@ sub sync_disks {
 
 		my $format = PVE::QemuServer::qemu_img_format($scfg, $volname);
 
-		if (!($scfg->{type} eq 'zfspool') || ($format eq 'qcow2')) {
+		if (!($scfg->{type} eq 'zfspool' || $format eq 'qcow2')) {
 		    die "non-migratable snapshot exists\n";
 		}
 	    }
-- 
2.1.4





More information about the pve-devel mailing list