OpenVZ Forum


Home » General » Support » How to force a frozen VE to stop?
How to force a frozen VE to stop? [message #27976] Tue, 04 March 2008 19:57 Go to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
Is there another way of stopping a VE not using "vzctl stop VE"?
I'm asking this, because somethig happened in my mail server that crashed it. I couldn't ping the server, and "vzctl enter VE" was not responding. It was frozen...
So, I tried to stop it with "vzctl stop VE" but, after a while, he answered "time out".
I had no other way of stopping it, so I tried to shutdown the hardware node, but he was not able to stop the mail VE, so, I had to pull down the button... Sad
This issue happened twice and I'm hoping it wouldn't happen again.
But if it would happen, what can I do to avoid shuting down everything?
Is there a way to force a frozen VE to shutdown?

Note: I'm using vzctl-3.0.16-1, kernel 2.6.18-ovz28stab035.1-smp and Centos-4.5-x86_64

Re: How to force a frozen VE to stop? [message #27978 is a reply to message #27976] Tue, 04 March 2008 23:17 Go to previous messageGo to next message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Yeah, except advice to upgrade kernel/vzctl in spec. this case. It's supposed. I really want to know too.

I have the same issue some times (very rarely) with a last kernels. In the last time unfsd (userspace daemon) in vps going crazy (high cpu uasge, but not in D state) and I could not kill it, could not stop vps.


But, I think there is no such solution, like a kill whole container's group processes, if something goes very wrong. Only reboot/reset node, yes?
Re: How to force a frozen VE to stop? [message #28217 is a reply to message #27976] Tue, 11 March 2008 19:59 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
One way to force the container to stop is to identify all of the processes in the container... and then kill them from the host node.

To find the init processes... do a "pstree -nup | grep init" and then do a vzpid on each init process until you identify the init process for the container in question.

Then do a pstree -nup and find all of the child process pids that belong to the init for the container. Killing all of the processes that fall under the init and then the init will stop the container. You might still need to umount /vz/root/{CT}.

I really don't recommend you do it that way but it can be done if needed.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: How to force a frozen VE to stop? [message #28218 is a reply to message #28217] Tue, 11 March 2008 20:09 Go to previous message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Not always. Certanly I've try do it exactly that way. If one of container's processes is unkillable in some of reason, that solution don't work.
Previous Topic: OpenVZ kernel didn't work !!
Next Topic: Linux version host/guest
Goto Forum:
  


Current Time: Wed Nov 06 09:07:29 GMT 2024

Total time taken to generate the page: 0.03386 seconds