[PVE-User] move virtual disk with snapshots
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Aug 3 09:15:51 CEST 2020
On July 31, 2020 8:46 am, Roland wrote:
> hello,
>
> can someone explain, why it's not possible in proxmox to move a VMs
> virtual disk with snapshots to a different datastore/dir - not even when
> offline?
because it only works from one storage type to the same storage type and
even then requires custom code for each storage type for a rarely used
operation.
> we need to fix some zfs dataset/dir naming/structure and can't as we
> would loose all our snapshots when moving VMs around...
if it's all ZFS, simply zfs send/recv a baseline (can be done while VMs
are running), then poweroff and send the delta since the baseline, sed
the storage name inside the config including all snapshots, start the VM
again. with a bit of careful checking of involved VM configs before
starting, the whole process can be automated if you want.
similar procedures, possibly with more downtime if no incremental
sync option exists, apply to other storage types as well.
as always, test with a test VM/setup first, and do backups before just
in case.
More information about the pve-user
mailing list