Migration failed, Cleaned up but left with zombie VMs

mylesw

Active Member
Feb 10, 2011
80
3
28
I was migrating a number of OpenVZ VMs between two servers and there was an unexpected server crash. This resulted in the servers not migrating properly but it left them showing on the source server. I was able to eventually get them to the target server by way of a restore from backup, but now I'm left with these zombie VMs on the original source server. If I try and remove them, I get an error.

If I look at the log from attempting to remove the VMs, I see this:

stat(/var/lib/vz/root/902): No such file or directory
Container is currently mounted (umount first)
TASK ERROR: command 'vzctl destroy 902' failed: exit code 41

What can I do to get rid of these zombie VMs from my web interface?

Myles
 
You are having some left-over configuration files on the previous node:
/etc/pve/nodes/<name_of_previous_node>/openvz/

They can safely be deleted provided you have the same config files on the new node. To be on the safe side make a backup before you delete the files.
 
OK, that makes sense. However there are about 5 node members to this cluster. Does this change have to be done to each node member, or only the original one that the VMs were on?

Myles
 
also try

# vzctl umount 902

maybe remove works afterwards?

Thanks for the tip, but it didn't work. Gives a stat (...) : No such file or directory and similar errors on realpath and can't umount ... afterwards.

Myles
 
You are having some left-over configuration files on the previous node:
/etc/pve/nodes/<name_of_previous_node>/openvz/

They can safely be deleted provided you have the same config files on the new node. To be on the safe side make a backup before you delete the files.

Thank you! This worked perfectly. Now everything appears to be cleaned up. Thank you for the advice.

Myles
 

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 your own in 60 seconds.

Buy now!