Proxmox Change disk configuration of VM with snapshots

From Notes_Wiki

Home > Debian > Proxmox virtual environment > Proxmox Change disk configuration of VM with snapshots

In proxmox we can take snapshots of the VM. However, if we want to change existing disks (eg remove one hard-disk) and then add another new hard-disk then there is concern on how will snapshots be effective if a disk is removed / added.

Thus, for a example requirement where we need to remove a old disk from a Linux VM and add a new disk without loosing ability to restore old snapshots use:

  1. Take one final snapshot of the VM with the old disk. We can revert to this or any older snapshot when required using below steps.
  2. Boot the VM and comment any automatic mounting of this disk to be removed partitions in /etc/fstab file
  3. Shutdown the vm
  4. Detach the storage using Hardware -> select the storage -> Detach. Note that we should only detach the storage and not remove/delete it so that we can still use older snapshots.
  5. Add another disk as per requirements
  6. Power on the VM
  7. Mount the new disk appropriately and use it
  8. (Optionally) Shutdown the VM and take a snapshot with a new disk also.

Now we can simply restore either older snapshot with old disk or new snapshot with new disk as per requirement. The mapping and unmapping of disks is automatically taken care of by proxmox.


Home > Debian > Proxmox virtual environment > Proxmox Change disk configuration of VM with snapshots