How to protect VM disks from accidental deletion?

Jan 12, 2022
Well, this is a little embarrasing.

I was restoring my Plex VM after giving up on UEFI boot with Nvidia gpu and I have plenty of restoration points for the main boot disk.
I restore the disk, and go into the hardware section to verify, and I see two unattached disks. One being my main media storage disk (>10TiB) and the other being the EFI disk I no longer need. (this is all on ZFS btw)
I wanted to delete the unattached EFI disk, and I poorly assumed it was the last unattached disk in the list. So I deleted it.
Then I went to reattach my supposed media disk and... oops... this disk is only 16MB. (It did not help that the VM restore did not reattach previously attached disks, or that the SIZE of the disks are not listed when unattached... could've spotted the right one if that were a feature...)

I guess the moral is reattach every disk to see what they are?
Now, its not a huge deal, the media can be redownloaded. And I never had a backup because I basically don't have the storage space to keep an extra >10TiB just sitting around.

After this whole ordeal, I am questioning how I can avoid this problem in the future since a backup is not feasible.

Is there any way to lock a VM disk from being deleted in the GUI? (Something where I'd have to go into the CLI or otherwise very uniquely identify a disk for deletion?)
is there any way to show the VM disk sizes when they are unattached in the GUI?


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!