Collapse

Announcement

Collapse
No announcement yet.

Unable to start init, probably incorrect template

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to start init, probably incorrect template

    I am unable to start the VPS, please check below output and vzctl logs from the node for more details.

    ```
    [root@sh43 ~]# vzctl start 176
    Starting container...
    Container is mounted
    Adding IP address(es): 107.6.xxx.xxx 107.6.xxx.xxx
    Setting CPU limit: 400
    Setting CPU units: 1000
    Setting CPUs: 4
    Unable to start init, probably incorrect template
    Container start failed
    Killing container ...
    Container was stopped
    Container is unmounted
    ```

    Logs:
    ```
    2018-02-10T16:54:59-0500 vzctl : CT 176 : Unable to start init, probably incorrect template
    2018-02-10T16:54:59-0500 vzctl : CT 176 : Container start failed
    2018-02-10T16:54:59-0500 vzctl : CT 176 : Killing container ...
    2018-02-10T16:55:00-0500 vzctl : CT 176 : Locked by: pid 133254, cmdline vzctl start 176
    2018-02-10T16:55:00-0500 vzctl : CT 176 : Container already locked
    2018-02-10T16:55:00-0500 vzctl : CT 176 : Container was stopped
    2018-02-10T16:55:00-0500 vzctl : CT 176 : Container is unmounted
    ```

    Please check and advise.

  • #2
    This issue cause because of the init file missing under VPS. You can try the following steps to fix this “Unable to start init, probably incorrect template" error on OpenVZ nodes.

    1) Find the distro is the OS Template of?

    ---> To identify the OS template installed on the VM, use below command on the node:

    ```
    [root@sh43 cache]# cat /etc/vz/conf/176.conf | grep OSTEMPLATE
    OSTEMPLATE="centos-6-x86_64"
    ```

    2) Search init file

    ---> You can check the init file on the VM by using the below command on the node.

    [root@sh43 cache]# ll /vz/private/176/sbin/init
    ls: cannot access /vz/private/176/sbin/init: No such file or directory


    Note : Please replace your container ID. For e.g, here the container ID is 176.

    If you can see that the init file is missing or the file size is zero, your VPS will not start.

    Resolution

    There are two method to fix this issue.

    1) You will need to copy the init file from an another VPS using the same OS template.

    cp /vz/root/175/sbin/init /vz/private/176/sbin/

    2) You can extract the OS template located under /vz/template/cache/ directory and copy the init file from there.

    tar -xvf /vz/template/cache/centos-6-x86_64.tar.gz

    cp /vz/template/cache/centos-6-x86_64/sbin/init /vz/private/176/sbin/


    Now, you can start the VM using the below command without any issue.

    vzctl start 176

    Note : Replace the container ID with your VPS ID.

    Please contact our support Team, if you have any further queries or need assistance.

    Comment

    Working...
    X