[pve-devel] [PATCH qemu-server] migrate: btrfs support in checks

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Aug 24 11:55:51 CEST 2016


---
 PVE/QemuMigrate.pm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index 6415032..2d484c1 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -309,11 +309,11 @@ sub sync_disks {
 
 	    if (defined($snapname)) {
 		# we cannot migrate shapshots on local storage
-		# exceptions: 'zfspool' or 'qcow2' files (on directory storage)
+		# exceptions: 'zfspool', 'btrfs' or 'qcow2' files (on directory storage)
 
 		my $format = PVE::QemuServer::qemu_img_format($scfg, $volname);
 
-		if (!($scfg->{type} eq 'zfspool') || ($format eq 'qcow2')) {
+		if (!($scfg->{type} eq 'zfspool' || $scfg->{type} eq 'btrfs') || ($format eq 'qcow2')) {
 		    die "non-migratable snapshot exists\n";
 		}
 	    }
@@ -373,7 +373,8 @@ sub sync_disks {
 	    my $scfg =  PVE::Storage::storage_config($self->{storecfg}, $sid);
 
 	    my $migratable = ($scfg->{type} eq 'dir') || ($scfg->{type} eq 'zfspool') ||
-		($scfg->{type} eq 'lvmthin') || ($scfg->{type} eq 'lvm');
+		($scfg->{type} eq 'lvmthin') || ($scfg->{type} eq 'lvm' ||
+		($scfg->{type} eq 'btrfs'));
 
 	    die "can't migrate '$volid' - storage type '$scfg->{type}' not supported\n"
 		if !$migratable;
-- 
2.1.4





More information about the pve-devel mailing list