[SOLVED] Remove VM disk from CLI?

Dec 13, 2021
24
5
8
Hi I run proxmox 7.2-7, I'm trying to remove a VM disk from the CLI.
I have tried the following:
Code:
qm set $VMID --delete scsi0
zfs destroy -f $STORAGE/vm-$VMID-disk-0

The first command seems to mark the disk as unused, and the second removes the zfs volume, but the UI still believes the disk is there?
What is the correct way to delete a disk from a VM using cli?
 
I think I managed to find the correct way qm set $VMID --delete unused0 would have been nice if
qm set $VMID --delete scsi0 had printed out unused0 so that I had a hint. (This also seems to delete the zfs volume so I don't have to delete it any more)
 
  • Like
Reactions: leesteken

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!