Signed-off-by: Wolfgang Bumiller <[email protected]>
---
Changes to v1:
  Rebased & Comment fixup.

Note that I have not yet opted to switch these tests to
`volume_has_feature` based ones. There are still some
unresolved questions there.

 src/PVE/LXC/Migrate.pm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index ce1f7dd..95562e4 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -155,8 +155,8 @@ sub phase1 {
 
        if (defined($snapname)) {
            # we cannot migrate shapshots on local storage
-           # exceptions: 'zfspool'
-           if (($scfg->{type} eq 'zfspool')) {
+           # exceptions: 'zfspool', 'btrfs'
+           if ($scfg->{type} eq 'zfspool' || $scfg->{type} eq 'btrfs') {
                return;
            }
            die "non-migratable snapshot exists\n";
@@ -222,8 +222,9 @@ sub phase1 {
            my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
            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');
+           my $migratable = ($scfg->{type} eq 'dir') || ($scfg->{type} eq 
'zfspool')
+               || ($scfg->{type} eq 'lvmthin') || ($scfg->{type} eq 'lvm')
+               || ($scfg->{type} eq 'btrfs');
 
            die "storage type '$scfg->{type}' not supported\n"
                if !$migratable;
-- 
2.30.2



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to