Finding init process ID or killing container
From Notes_Wiki
<yambe:breadcrumb>Troubleshooting_openVZ_issues|Troubleshooting openVZ issues</yambe:breadcrumb>
Finding init process ID or killing container
If "vzctl stop <CTID>" or "vzctl restart <CTID>" hangs then we can kill the container using following steps:
- Find container init process ID using:
- lsof 2>&1 | grep /vz/root/<CTID>/ | grep -v UID | less
-
- The process which has /dev/null open inside the container is init. Typically first lowest (PID) should also be of init
- Use ' kill -9 <init-pid>' to kill the container.