[SOLVED] Accidentally modified the disk size of a template with linked clone to it

Herkz

Member
Mar 21, 2020
13
2
8
26
Hi,

I have a cloud init template which I use for all my VMs. I created a new VM and wanted to increase the disk size as usual but didn't pay attention and I modified the template disk size.

Template disk that I incremented by 50Gb...
1663060066365.png

As all my VM are linked clone, I can't delete and recreate a template so I want to resize the disk.

I found this thread: https://forum.proxmox.com/threads/decrease-size-of-vm-hard-disk.76293/ with this solution from Stefan_R

  1. Make sure there is absolutely no important data in the sectors of the disk you're going the remove (starting from the end of the disk)
  2. (Make a backup before proceeding to be really sure)
  3. Shut down the VM
  4. Tell ZFS to shrink the disk (e.g. zfs set volsize=XXXG rpool/data/vm-<vmid>-disk-0, use zfs list to find the correct one)
  5. Run qm rescan <vmid>
  6. Start the VM to verify
Is it safe to do it on a template disk with linked clones attached to it ?

Regards,

hk
 
it should be, since the linked clones are created from the __base__ snapshot of the base volume, and snapshots are immutable.
 
  • Like
Reactions: Herkz