[pve-devel] [PATCH qemu-server] refuse to migrate volume-chain-snapshots for now
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Jul 18 13:56:10 CEST 2025
When using qcow2 "backing volumes" for snapshots we'd have to copy all
of them for local-storage migration. Let's refuse to do this for now
and wait until we decide whether this should also happen via
replication at some point.
Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
src/PVE/QemuMigrate.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index f46bdf40..251fcc79 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -454,6 +454,10 @@ sub scan_local_volumes {
# we cannot migrate snapshots on local storage
# exceptions: 'zfspool' or 'qcow2' files (on directory storage)
+ #
+ # Note that only qcow2 with in-qcow2 snapshots work - for
+ # backing-chain snapshots we'd need to copy the entire snapshot
+ # list (or support replication)
die "online storage migration not possible if non-replicated snapshot exists\n"
if $self->{running} && !$local_volumes->{$volid}->{replicated};
@@ -464,7 +468,8 @@ sub scan_local_volumes {
if (!(
$scfg->{type} eq 'zfspool'
|| ($scfg->{type} eq 'btrfs' && $local_volumes->{$volid}->{format} eq 'raw')
- || $local_volumes->{$volid}->{format} eq 'qcow2'
+ || ($local_volumes->{$volid}->{format} eq 'qcow2'
+ && !$scfg->{'snapshot-as-volume-chain'})
)) {
die "non-migratable snapshot exists\n";
}
--
2.47.2
More information about the pve-devel
mailing list