Today we encountered a situation where a Proxmox system’s KVM virtual machine refused to delete after the storage volume that it’s virtual HDD resided on was lost; trying to delete the KVM from the web GUI resulted in the following error:
TASK ERROR: storage ‘proxmoxHDD’ does not exists
Attempting to delete it from the command line using:
qm destroy [VM ID]
storage ‘proxmoxHDD’ does not exists
Fortunately, there’s a way around this. The KVM config files live in:
Move or erase the [VM ID].conf file and when you refresh your web GUI the VM should be gone.
Sometimes a Proxmox KVM VM will stop responding to the GUI’s attempts to shut it down; fortunately it’s easy to shut it down from the command line. Make note of the VM ID (next to the name of the VM in the left pane of the Proxmox GUI), log into the server via SSH as root and run:
qm stop [vmid]
qm stop 124
Check back in the GUI a few seconds later and you should see that the KVM has stopped.
If you are in a terminal and want to find the container IDs (CTID) quickly without opening up a browser, run the following:
It should return a list of the container IDs, the VM state, their IP addresses and hostnames like so:
CTID NPROC STATUS IP_ADDR HOSTNAME
100 25 running 10.1.1.51 nyx.luna.com
101 17 running 10.1.1.65 euphrosyne.luna.com
102 58 running 10.1.1.22 metis.luna.com
103 15 running 10.1.1.25 curo.luna.com
104 52 running 10.1.1.60 ogmios.luna.com
Quick and easy.
If you’re trying to figure out why you are getting NFS errors despite having NFS set up properly on the host machine and client VM, this may be the answer. With the VM powered off, run at the Proxmox terminal:
vzctl set [VM ID] --features "nfs:on" --save
The next time the VM is powered up NFS should be enabled and you should be able to mount shares correctly. An example:
vzctl set 104 --features "nfs:on" --save