You can use --bootorder option of the
vzctl set command to configure the startup priority.
bootorder sets the start-up priority for Containers. The higher number is assigned to the Container, the earlier in the boot process this container starts.
To configure your Containers to start in this order, you should perform the following operations:
Make sure that all four Containers are configured to automatically start on the physical server boot. If they are not, use this command to configure them. For example container #101:
vzctl set 101 --onboot yes --save
Set the necessary start order for containers.
To set the highest priority for Container 102:
vzctl set 102 --bootorder 10 --save
To make Container 104 start after:
vzctl set 104 --bootorder 5 --save
From now on, the containers will start in the following order: Container 102 will start first because it has the highest priority. Container 104 will start second because its priority is lower than that of Container 102.
The containers which priority was not changed will start after all of the containers with
The start order of Containers with equal(or unset) priority is determined by their IDs.
You can check the priority currently set for Containers by executing the following command:
vzlist -o ctid,bootorder
To reset the priority of Container 102:
vzctl set 102 --bootorder 0