Previous page

Next page

Locate page in Contents

Print this page

prlctl start, stop, restart, status

These commands start, stop, restart, and show the current state of Containers, respectively.

Syntax

prlctl start < CT_ID|CT_name > [ --wait ]

prlctl stop < CT_ID|CT_name > [ --fast ]

prlctl restart < CT_ID|CT_name >

prlctl status < CT_ID|CT_name >

Options

Name

Description

<CT_ID |CT_ name>

Container ID or name.

The first command is used to start a Container. It will set up all network interfaces inside the Container, initialize the Container quota, if needed, start the init process inside the Container, and exit. You can also make the prlctl start command wait for all the necessary startup processes to complete and the Container to boot into the default runlevel by passing the --wait option to this command.

When starting a Container, prlctl executes a number of helper scripts located in the /vz/private/< CT_ID >/scripts (the first and last scripts in the table) and /etc/vz/conf (all the other scripts in the table) directories

Scripts (in the order of execution):

Name

Description

mount

Optional Container mount script. If it exists, then it is executed immediately after mounting the Container private area. If it exits with a non-zero status, then prlctl dismounts the Container private area and returns the error.

vz-start

This script sets up IP traffic accounting for the Container.

vz-net_add

This script creates the necessary ARP entries and sets up the necessary routing entries for Container IP addresses.

ve-alias_add

This script configures the network interfaces inside the Container.

ve-veconfig

This script is called by prlctl to set a hostname and DNS search domains inside the Container.

ve-quota

If the second-level (per-user/group) quota is turned on, then prlctl calls this script to form the correct /etc/mtab file inside the Container.

start

Optional Container start script. If it exists, then it is executed in the context of a just started Container.

prlctl stop shuts the Container down. If the Container is not down after a two-minute timeout due to an error in an application, for example, prlctl will forcibly kill all the processes inside the Container. To avoid waiting for two minutes in case of a corrupted Container, you may use the --fast option with this command. The normal shutdown sequence of prlctl stop is described below in the order of execution:

  1. stop . Optional Container stop script. If it exists, then it is executed in the context of the Container prior to any other actions. If it exits with non-zero status, then prlctl does not stop the Container.
  2. umount . Optional Container unmount script. If it exists, then it is executed after stopping the Container but before dismounting its private area.
  3. vz-stop . This script deletes routing and IP traffic accounting for the Container.

You should use action scripts ( mount / umount and start / stop ) if you would like to carry out some actions upon the Container startup/shutdown. However, there might be situations when you have to modify other scripts documented above. In this case it is strongly suggested that you create a separate script containing all your modifications and add an invocation of this script to shipped scripts. This will facilitate upgrades to future Parallels Cloud Server versions.

The prlctl restart < CT_ID > command consecutively performs the stopping and starting of the corresponding Container.

The prlctl status command shows the current Container state. It outputs the following information: whether the Container private area exists, whether it is mounted and whether the Container is running.