How to destroy OpenVZ VM manually?

rugby

Member
Oct 24, 2009
138
0
16
I finally got around to updating to the newest kernel this morning and have a few OpenVZ VM's I would like to get rid of. I cannot delete them from PVE's webadmin, how do I do this manually?
 
vzctl destroy VEID

or

1. Stop it - vzctl stop VEID
2. remove its config file ( /etc/vz/conf/VEID.conf)
3. Remove VPS files and directory ( /var/lib/vz/private/VEID , /var/lib/vz/root/VEID )
 
I'm stuck here. I've done exactly as Nemesiz described, but the proxmox web interface is still showing this OpenVZ container. There's no trace I can find of it on the filesystem any longer, but it still shows in the web interface. Any ideas?

I took a stab and doing a vzrestore onto that VEID and the restore worked fine, but when I destroyed that, the original container showed up in the web interface again. It seems to be really stuck there.
 
Last edited:
I'm stuck here. I've done exactly as Nemesiz described, but the proxmox web interface is still showing this OpenVZ container. There's no trace I can find of it on the filesystem any longer, but it still shows in the web interface. Any ideas?

I took a stab and doing a vzrestore onto that VEID and the restore worked fine, but when I destroyed that, the original container showed up in the web interface again. It seems to be really stuck there.

Strange - try:

# /etc/init.d/pvedaemon restart
# /etc/init.d/apache2 restart

Does that help?
 
Does it help if you delete this file:

# rm /var/lib/pve-manager/vzlist

(it is re-created automatically)
 
Does it help if you delete this file:

# rm /var/lib/pve-manager/vzlist

(it is re-created automatically)

Nope. Same issue. When I cat that file, I see the invalid entry. I then deleted the file, but when it recreated, it still shows the invalid entry.
 
I just realized the phantom VM is actually a KVM virtual, not a OpenVZ container. Still squirrely, but probably changes the troubleshooting methods. Any new ideas based on this new information?
 
looks like a part of the problem sits on front of the box :-)

KVM: see /etc/qemu-server/ and delete the corresponding VMID.conf file.
 
looks like a part of the problem sits on front of the box :-)

KVM: see /etc/qemu-server/ and delete the corresponding VMID.conf file.

That was it!! Really helps when you know the right kind of virtual you're dealing with!

I am absolutely man enough to admit part of the problem was sitting in my chair. We like to call that a PEBKAC issue (Problem exists between keyboard and chair).

Thanks for all the great support you guys provided!