Finding init process ID or killing container

From Notes_Wiki
Revision as of 13:09, 24 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > 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:

  1. 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
  2. Use ' kill -9 <init-pid>' to kill the container.



Home > CentOS > CentOS 6.x > Virtualization tools > OpenvZ > Troubleshooting openVZ issues > Finding init process ID or killing container