Article ID: 118715, created on Nov 18, 2013, last review on May 10, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor

Symptoms

Container stays running after "reboot" command is executed, container has all it's services stopped, and you may find only some workers running inside:

[root@pvcfl ~]# vzctl exec 92097 ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  30168  2096 ?        Ss   16:24   0:00 init
root         2  0.0  0.0      0     0 ?        S    16:24   0:00 [kthreadd/92097]
root         3  0.0  0.0      0     0 ?        S    16:24   0:00 [khelper/92097]
root         4  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/0]
root         5  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/1]
root         6  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/2]
root         7  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/3]
root         8  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/4]
root         9  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/5]
root        10  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/6]
root        11  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/7]
root        12  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/8]
root        13  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/9]
root        14  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/10]
root        15  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/11]
root        16  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/12]
root        17  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/13]
root        18  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/14]
root        19  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/15]
root        20  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/16]
root        21  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/17]
root        22  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/18]
root        23  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/19]
root        24  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/20]
root        25  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/21]
root        26  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/22]
root        27  0.0  0.0      0     0 ?        S    16:24   0:00 [rpciod/92097/23]
root        28  0.0  0.0      0     0 ?        S    16:24   0:00 [nfsiod/92097]
root      2988  0.0  0.0  15260  1132 ?        Rs   17:10   0:00 ps aux

Inside of container "reboot" script is missing in rc6.d:

root@container:~# ls -la /etc/rc6.d/
total 12
drwxr-xr-x  2 root root 4096 Nov 11 16:21 .
drwxr-xr-x 86 root root 4096 Nov 11 20:35 ..
lrwxrwxrwx  1 root root   24 Oct 30 09:04 K01modules_dep.sh -> ../init.d/modules_dep.sh
lrwxrwxrwx  1 root root   18 Oct 30 09:04 K01plymouth -> ../init.d/plymouth
lrwxrwxrwx  1 root root   17 Oct 30 09:04 K01urandom -> ../init.d/urandom
lrwxrwxrwx  1 root root   15 Oct 30 09:04 K02quota -> ../init.d/quota
lrwxrwxrwx  1 root root   18 Oct 30 09:04 K03sendsigs -> ../init.d/sendsigs
lrwxrwxrwx  1 root root   17 Oct 30 09:04 K04rsyslog -> ../init.d/rsyslog
lrwxrwxrwx  1 root root   20 Oct 30 09:04 K05hwclock.sh -> ../init.d/hwclock.sh
lrwxrwxrwx  1 root root   22 Oct 30 09:04 K05umountnfs.sh -> ../init.d/umountnfs.sh
lrwxrwxrwx  1 root root   20 Oct 30 09:04 K07networking -> ../init.d/networking
lrwxrwxrwx  1 root root   18 Oct 30 09:04 K08umountfs -> ../init.d/umountfs
lrwxrwxrwx  1 root root   22 Nov  8 17:50 K09hostname_vps -> ../init.d/hostname_vps
lrwxrwxrwx  1 root root   29 Nov  8 17:56 K10unattended-upgrades -> ../init.d/unattended-upgrades
lrwxrwxrwx  1 root root   18 Nov 11 16:14 K10vzreboot -> ../init.d/vzreboot
lrwxrwxrwx  1 root root   17 Nov  8 17:57 K20postfix -> ../init.d/postfix
lrwxrwxrwx  1 root root   15 Nov  8 17:58 K21mysql -> ../init.d/mysql
-rw-r--r--  1 root root  351 Oct 15  2012 README

Cause

This symptom points to the fact that runlevel got changed to 6, as all services are stopped, however, "reboot" command wasn't executed. In our scenario it's not executed because it's missing.

Resolution

Recreate "reboot" script in rc6.d.

In CentOS/Redhat systems please execute following command:

# ln -s /etc/init.d/halt /etc/rc6.d/S01reboot

In Debian/Ubuntu systems please execute following command:

# update-rc.d reboot start 1 6 .

Example output from the correct execution:

root@container:/etc# update-rc.d reboot start 1 6 .
    Adding system startup for /etc/init.d/reboot ...
   /etc/rc6.d/S01reboot -> ../init.d/reboot
root@container:/etc#

Search Words

not rebooted

reboot

S01reboot

not rebooting

running after reboot

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF