Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

An openvz container can be stopped with

vzctl stop <id>

, but this needs the cooperation from the init inside the container. In case a container is compromised a way is needed to stop the container withouts its cooperation. Something like a

vzctl kill <id>

is needed which kills all processes inside the container and puts it into the stopped state. Such a kill command is not listed in the manpage.

How can an openvz container be killed/stopped without needing it's cooperation?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

http://wiki.openvz.org/User_Guide/Operations_on_Containers#Starting.2C_Stopping.2C_Restarting.2C_and_Querying_Status_of_Container

in case of a Container that is known to be corrupt, you may use the --fast switch:

# vzctl stop 101 --fast
Stopping container ...
Container was stopped
Container is unmounted

Make sure that you do not use the --fast switch with healthy Containers, unless necessary, as the forcible killing of Container processes may be potentially dangerous.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.