Move VM and Snapshots to a new LVM volume

swinster

New Member
Jan 17, 2024
2
0
1
Hi,

I must move a VM with all its snapshots from one LVM volume to another. What is the best way to do this?

I realise that removing the snapshots is ideal - this is impossible for my scenario.

Cheers
 
Hi,
unfortunately, it's not possible at the moment via Proxmox VE API/CLI. Feel free to open a feature request on our bugtracker (after checking if one exists). You'd need to do it manually.

Proceed at your own risk!

You'd need to, while the VM is down, copy the snap_vm-XYZ-disk-N_NAME and vm-XYZ-state-NAME volumes and the actual volumes (state volumes are only present for snapshots with RAM) to the new storage and adapt the VM configuration file accordingly (reference to disks, vmstate entries).

To be safe, I'd change the ID to something else while copying, and also copy the configuration file (adapting the ID everywhere), so you can work with the copy and only remove the original volumes after verifying that everything works as expected. You can even take a new snapshot, so you can test rollback to others without losing current state.
 
  • Like
Reactions: Moayad

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!