Article ID: 120403, created on Mar 2, 2014, last review on May 11, 2014

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Linux 4.7

Symptoms

Debian-based ploop container fails to start with your OS template may be incorrect error message:

# vzctl start 999
Container is mounted
Starting the Container ...
Os release: 3.2.41-042stab081.3
CPU limit: 0.0%
Setting permissions 20002 dev 0x7d00
Setting permissions 20007 dev 0xae5
Setting permissions 20007 dev 0xac8
Setting permissions 20007 dev 0x502
Adding offline management to Container(1): 4643
Adding IP addresses: 1.2.3.4 2a01:488:66:1000:57e6:1280:0:1
Hostname of the Container set: debian.vps
File resolv.conf was modified
Setting permissions 60010 dev 0x5b20b641
ERROR: Unable to start the Container; your OS template may be incorrect
Failed to start the Container
Container is unmounted
Failed to start the Container

Additional check

Simulteneously with starting the container check if any processes actually get started:

  • launch the command:

    while (true); do vzps -E 999 uxwwf; sleep 0.05; done
    
  • through another ssh connection (or in another screen window) try to start the container:

    vzctl start 999`
    
  • immediately when the container start fails, interrupt the commaind while (true); do vzps -E 999 uxwwf; sleep 0.05; done using Ctrl+c

The output of while (true); do vzps -E 999 uxwwf; sleep 0.05; done command will contain similar records:

USER         PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root      924724  0.0  0.0     0    0 ?        S    15:12   0:00 [kthreadd/999]
root      924725  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [khelper/999]
root      924726  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/0]
root      924727  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/1]
root      924728  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/2]
root      924729  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/3]
root      924730  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/4]
root      924731  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/5]
root      924732  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/6]
root      924733  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/7]
root      924734  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/8]
root      924735  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/9]
root      924736  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/10]
root      924737  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/11]
root      924738  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/12]
root      924739  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/13]
root      924740  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/14]
root      924741  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/15]
root      924742  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [nfsiod/999]
root      924717  0.0  0.0 26368  528 ?        Ss   15:12   0:00 vzctl start 999
root      924754  0.0  0.0  4000  324 ?        D    15:12   0:00  \_ sh -c /usr/sbin/update-rc.d vzreboot stop 10 6 .
...
...
USER         PID %CPU %MEM   VSZ  RSS TTY      STAT START   TIME COMMAND
root      925162  0.0  0.0 26368  508 ?        Ds   15:12   0:00 vzctl start 999
root      924724  0.0  0.0     0    0 ?        S    15:12   0:00 [kthreadd/999]
root      924725  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [khelper/999]
root      924726  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/0]
root      924727  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/1]
root      924728  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/2]
root      924729  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/3]
root      924730  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/4]
root      924731  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/5]
root      924732  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/6]
root      924733  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/7]
root      924734  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/8]
root      924735  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/9]
root      924736  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/10]
root      924737  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/11]
root      924738  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/12]
root      924739  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/13]
root      924740  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/14]
root      924741  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [rpciod/999/15]
root      924742  0.0  0.0     0    0 ?        S    15:12   0:00  \_ [nfsiod/999]
root      924717  0.0  0.0 26368  548 ?        Ss   15:12   0:00 vzctl start 999

Cause

upstart package inside the container got corrupted or removed. (Guest OS got corrupted. The problem can be caused by a failed or incomplete OS upgrade inside the container, some trojan/rootkit being run in the container,...)

Resolution

Check the OS template for the affected container:

# vzpkg list 999
debian-7.0-x86_64               2014-02-26 11:42:33

Find the upstart package in the OS template's area:

# find /vz/template/debian/7.0/x86_64/ -name upstart*.deb
/vz/template/debian/7.0/x86_64/pm/archives/upstart_1.6.1-1_amd64.vz.deb

Reinstall the package inside the container:

# vzctl mount 999
Container is mounted
# cp /vz/template/debian/7.0/x86_64/pm/archives/upstart_1.6.1-1_amd64.vz.deb /vz/root/999/tmp/
# chroot /vz/root/999 
# dpkg --force-remove-essential -r sysvinit ## if sysvinit is installed
# dpkg -i /tmp/upstart_1.6.1-1_amd64.vz.deb

Try to start the container once again.

In case the container still fails to start, restore the container from a backup.

Search Words

ERROR: Unable to start the Container; your OS template may be incorrect

your OS template may be incorrect

-

c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 0c05f0c76fec3dd785e9feafce1099a9

Email subscription for changes to this article
Save as PDF