User`s guide
Reference 94
vzctl destroy
The syntax of this command is:
vzctl destroy vpsid
This command is used to delete a Virtual Private Server, which is no longer needed. It
physically removes all the files located in VPS private area (specified as VE_PRIVATE variable
in the VPS configuration file) and renames the VPS configuration file in
/etc/sysconfig/vz-scripts/ from vpsid.conf to vpsid.conf.destroyed. It
also renames VPS action scripts if any in a similar manner.
This command does not take any additional arguments and requires the Virtual Private Server to
be stopped and its private area to be dismounted.
vzctl start, vzctl stop, vzctl restart, and vzctl status
These four commands have the same syntax and take no obligatory arguments:
vzctl start vpsid
vzctl stop vpsid [--fast]
vzctl restart vpsid
vzctl status vpsid
The first command is used to start a Virtual Private Server. It will set up all network interfaces,
initialize VPS quota, if needed, and start the init process inside the Virtual Private Server.
When starting a Virtual Private Server, vzctl can execute custom scripts located in the
/etc/sysconfig/vz-scripts directory, namely (in order of execution):
vpsid.mount
Optional Virtual Private Server mount script. If it exists then it is executed
immediately after mounting VPS private area. If it exits with non-zero status
then vzctl dismounts VPS private area and returns the error.
vpsid.start
Optional Virtual Private Server start script. If it exists then it is executed in the
context of just started VPS.
vzctl stop shuts the Virtual Private Server down. If the VPS is not down after a two-minute
timeout due to an error in an application, for example, vzctl will forcibly kill all the processes
inside the VPS. To avoid waiting for two minutes in case of a corrupted Virtual Private Server,
you may use the --fast option with this command. The normal shutdown sequence of vzctl
stop is described below in order of execution:
vpsid.stop
Optional Virtual Private Server stop script. If it exists then it is executed in
context of the Virtual Private Server prior to any other actions. If it exits with
non-zero status then vzctl does not stop the VPS.
vpsid.umount
Optional Virtual Private Server umount script. If it exists then it is executed
after the VPS was stopped but before its private area is being dismounted.