Virtuozzo 7 is a virtualization solution that allows you to run multiple virtual machines and containers on a single physical server.
This chapter provides general information about Virtuozzo and this guide.
Virtuozzo 7 is a virtualization solution that allows you to simultaneously run multiple Virtuozzo virtual machines and containers on a single physical server. With Virtuozzo, you can efficiently share your server’s hardware resources among virtual machines and containers.
Virtuozzo is installed directly on the server hardware and does not need any operating system to function. Once it is installed, Virtuozzo allows you to create virtual machines and containers and manage them using the Virtuozzo command-line interface (CLI). The command-line interface comprises a set of Virtuozzo command-line utilities that you can use to manage virtual machines and containers, both locally and remotely.
Graphically, a server with the Virtuozzo software installed can be represented as follows:
This guide is a reference of Virtuozzo configuration files and command-line utilities. It familiarizes you with the way to configure Virtuozzo to meet your requirements and to perform various tasks by using the corresponding command-line utilities.
The primary audience for this guide is anyone who is looking for an explanation of a particular configuration option, needs help for a particular command, or is seeking for a command to perform a certain task.
This chapter provides instructions on configuration files, scripts, and command-line utilities that can be used to configure the settings related to the Virtuozzo software and the hardware node.
The table below lists the configuration files available in Virtuozzo 7. Most files are located in the /etc
directory on a hardware node. If a configuration file is stored in a place other than the hardware node, its exact location is specified.
Name | Description |
---|---|
|
Global configuration file. This file keeps system-wide settings, such as the default location of templates and global network settings. |
|
Private configuration file of a container with the name |
|
Sample files containing a number of default container configurations. Some pre-created samples file are shipped with Virtuozzo (e.g., |
|
Linux distribution configuration files. These files define what scripts should be run when you perform specific operations with containers (e.g., when you set a new IP address for a container). The scripts differ from Virtuozzo action scripts and depend on the Linux version a particular container is running. |
|
Configuration file used by the |
|
OOM killer configuration file with task badness adjustments. |
|
Configuration file defining the network classes for traffic shaping and bandwidth management. |
|
Kernel parameters. Virtuozzo adjusts a number of kernel |
|
Configuration file used by the |
Virtuozzo keeps its system wide configuration parameters in the /etc/vz/vz.conf
configuration file. This file is in shell format. Keep in mind that Virtuozzo scripts source this file - thus, shell commands in this file will cause system to execute them under root account. Parameters in this file are presented in the form PARAMETER="value"
. Logically all the parameters belong to the following groups: global parameters, logging, disk quotas, template, network traffic, containers, validation and overcommitment, supplementary parameters, and name-based hosting parameters. Below is the description of all the parameters defined in this version of Virtuozzo.
Name | Description | Default Value |
---|---|---|
|
This can be either |
|
|
Specifies either the hostname or the IP address of the HTTP proxy server. After setting this parameter and in case you use an HTTP proxy server for handling all HTTP requests, the Virtuozzo utilities communicating with the outer world through HTTP will use this server for managing all your HTTP messages. |
n/a |
|
This is the directory where |
|
|
Actions on a container should be serialized, since two simultaneous operations on the same container may break its consistency. Virtuozzo keeps lock files in this directory in order to serialize access to one container. |
|
|
File system to use when caching OS templates:
|
|
|
Defines whether the IPv6 support is enabled on the hardware node. |
|
|
Enables ( |
|
|
Path to the memory and IOPS deduplication cache with common container files. |
|
|
Path to the private area of the memory and IOPS deduplication cache. |
|
|
Image size (in 1KB blocks) of the memory and IOPS deduplication cache. |
|
|
Directories for which memory and IOPS deduplication is enabled by default. |
|
|
Enables limits for the backup, restore, and migration operations. |
|
|
Sets the disk I/O limit for the backup, restore, and migration operations, in bytes per second. Not set by default. |
|
Name | Description | Default Value |
---|---|---|
|
This parameter defines whether |
|
|
File where |
|
|
Logging verbosity, from 0 to 10 (higher is more verbose). |
|
Name | Description | Default Value |
---|---|---|
|
Enables or disables disk quotas for containers. If set to |
|
Name | Description | Default Value |
---|---|---|
|
Traffic shaping allows you to limit the bandwidth consumed by containers for outgoing traffic. If it is set to "yes", then limitations will be turned on. If you want to use this feature, |
|
|
This is the list of network interfaces on which we want to shape the traffic and their speed in the form of "dev:rate". The rate is measured in Kbps. If you want to shape traffic on more than one interface, set this parameter to |
|
|
This parameter sets the size of the bandwidth pool for all containers. It is the upper limit for the bandwidth available to all your containers and is specified in the form of "dev:class:rate". The rate is measured in Kbps. Containers can consume bandwidth up to this limit in addition to the limit specified by the |
|
|
This parameter is the default bandwidth guaranteed to a container for outgoing traffic if the container configuration file does not explicitly specify a different value. This value is in the same format as |
|
|
This optional parameter (where |
|
Name | Description | Default Value |
---|---|---|
|
This is the directory where to find templates. It is not recommended to redefine this option since all Virtuozzo templates use the default directory. |
|
Name | Description | Default Value |
---|---|---|
|
The mount point for container’s |
|
|
The directory where all the files and directories specific to the container are stored. Must contain the literal string |
|
|
The default configuration file sample to be used for the container creation; it may be overridden with the |
|
|
The default OS template to be used for the container creation. |
|
|
Additional environment variables to be passed to the container |
|
Each container has its own configuration file, which is stored in the /etc/vz/conf
directory and has a name like <CT_name>.conf
. This file has the same format as the global configuration file. The settings specified in this file can be subdivided into the following categories:
-
miscellaneous,
-
resource management parameters,
-
networking.
The table below list the miscellaneous parameters you can set in the configuration file of a container:
Name | Description | ||
---|---|---|---|
|
Specifies the Virtuozzo version the configuration file applies to. |
||
|
Specifies whether the container should be started automatically on system startup. Virtuozzo automatically starts all containers that have this parameter set to "yes" upon startup. |
||
|
Specifies whether the container may be restarted with the |
||
|
The name of the OS template that was used for creating the container. You do not have to change this parameter; |
||
|
In a configuration file of an existing container, this parameter lists application templates installed with the |
||
|
Overrides the |
||
|
Overrides the |
||
|
Overrides the |
||
|
Determines a set of technologies which should be provided by the Virtuozzo kernel for container operation. Currently, this parameter can contain the information about the following technologies:
|
||
|
If set to |
||
|
Sets the description for the container.
|
||
|
Container name that can be used to refer to said container in commands. Names must be alphanumeric and may contain the characters |
||
|
The configuration sample the container was based on when created. |
||
|
Indicates whether any of the container configuration parameters have been modified as regards its original configuration sample. If this parameter is omitted, its value is considered as |
||
|
The container unique identifier. This identifier is used by certain Virtuozzo utilities during their execution. |
All resource management parameters can be subdivided into the CPU, disk, system, and VSwap categories for your convenience. Any parameter can be set with the prlctl set
command and the corresponding option name (in the lower case, e.g., --cpuunits
for CPUUNITS
, etc.). See [_managing_containers] for more details. The Typical value column, if present, specifies a range of reasonable parameter values for different applications, from light to huge heavy loaded containers. If the barrier and limit fields are in use, ranges for both thresholds are given.
Parameter | Description | Typical value |
---|---|---|
|
CPU weight. This is a positive integer number that defines how much CPU time the container can get as compared to the other virtual machines and containers running on the server. The larger the number, the more CPU time the container can receive. Possible values range from 8 to 500000. If this parameter is not set, the default value of 1000 is used. |
|
|
CPU limit, in per cent ( |
|
|
Number of CPU cores defining the CPU limit for a container. The limit is calculated by multiplying the power of one CPU core by the number of the specified CPU cores. This option also defines the number of CPUs shown to users from inside a container. This parameter is not set for newly created containers; so they can consume all free CPU power of the server. |
|
|
The CPU affinity mask defining which CPUs on the Node can be used to handle the processes running in the container. The CPU mask can be specified as both separate CPU index numbers (1,2,3) and CPU ranges (2-4,5-7). |
|
|
The NUMA node mask defining a NUMA node to bind the container to. Once you set the mask, the processes running in the container will be executed only on the CPUs that belong to the specified NUMA node. |
|
Parameter | Description | Typical value |
---|---|---|
|
Total size of disk space that can be consumed by the container, in 1 KB blocks. |
|
|
This parameter enables (if set to a value other than |
|
|
The container priority for disk I/O operations. The higher the priority, the more time the container has for writing to and reading from the disk. The default container priority is 4. |
|
|
The maximum number of disk input and output operations per second a container is allowed to perform. By default, any newly created container does not have the IOPS limit set and can perform so many disk I/O operations per second as necessary. |
|
|
The bandwidth a container is allowed to use for its disk input and output (I/O) operations. By default, the limit is set in megabytes per second. However, you can use the following suffixes to use other measurement units:
In the current version of Virtuozzo, the maximum I/O bandwidth limit you can set for a container is 2 GB per second. The default I/O bandwidth limit for all newly created containers is set to 0, which means that no limits are applied to any containers. |
|
Parameter | Description | Typical value |
---|---|---|
|
Number of processes and threads allowed. Upon hitting this limit, container will not be able to start a new process or thread. |
|
|
Number of processes expected to run in the container on average. This is informational parameter used to ensure configuration correctness. |
|
|
Memory allocation guarantee, in pages. Applications are guaranteed to be able to allocate memory while the amount of memory accounted as |
|
|
Memory not allowed to be swapped out (locked with the |
|
|
Total size of shared memory (including IPC, shared anonymous mappings and |
|
|
Size of private (or potentially private) memory, allocated by an application. Memory that is always shared among different applications is not included in this resource parameter. |
|
|
Number of files opened by all container processes. |
|
|
Number of file locks created by all container processes. |
|
|
Number of pseudo-terminals. For example, the |
|
|
Number of |
|
|
Total size of RAM used by processes. This parameter is used for accounting purposes only. It shows the usage of RAM by the container. For memory pages used by several different containers (mappings of shared libraries, for example), only a fraction of a page is charged to each container. The sum of the |
|
|
The number of IP packet filtering entries. |
|
Parameter | Description | Typical value |
---|---|---|
|
Amount of RAM that can be used by the processes of a container, in 4KB pages. |
|
|
Amount of swap space that can be used by the container for swapping out memory once the RAM is exceeded, in 4KB pages. |
|
|
Memory overcommit factor that defines the memory allocation limit for a container. The limit is calculated as |
|
Network-related parameters allow you to set bandwidth management parameters, hostname and IP addresses that a container can use, and other parameters.
Name | Description |
---|---|
|
If this parameter is specified, then |
|
This is the list of IP addresses, which can be used on container network interfaces. This list is an argument of the container start call and it is impossible to assign IP address from inside the container if the address is not on the list. Any IP address assigned from within the container will be visible only within the container. |
|
The IP address of the DNS server the container is supposed to use. More than one server can be specified in the space-separated format. |
|
DNS search domains for the container. More than one domain can be specified. |
|
The names of physical network adapters that have been moved from the server to the given container. |
|
Indicates which
|
|
Specifies a number of parameters for the virtual network adapters existing inside the container. These parameters include:
|
|
If traffic shaping is turned on, then this parameter specifies bandwidth guarantee, in Kbps, for the container. The parameters should be set in the form of |
|
If set to |
Some Virtuozzo tools (e.g., prlctl
) need to run special scripts inside a container to perform certain operations on it. However, carrying out one and the same operation inside containers running different Linux versions may require execution of different actions. This may be caused by the fact that different Linux distributions store files in different locations, use different commands to complete one and the same task, and so on. To distinguish between containers running different Linux versions and to determine what scripts should be executed while performing the relevant container-related operations, Virtuozzo uses special distribution configuration files located in the /usr/libexec/libvzctl/dists
directory on the server.
There are a number of distribution configuration files shipped with Virtuozzo by default (centos.conf
, fedora-core.conf
, gentoo.conf
, etc.). To view all configuration files available on your Virtuozzo, you can go to the /usr/libexec/libvzctl/dists
directory and issue the ls
command. The distribution configuration files will be displayed in the form of <Linux_distribution>-<version>.conf
where <Linux_distribution>
and <version>
denote the name of the Linux distribution and its version, respectively (e.g., centos-7.conf
).
Any distribution configuration file consists of a number of entries in the form of <parameter_name>=<script_name>
where <parameter_name>
denotes the name of the parameter defining the operation when the script in the right part of the entry is to be executed and <script_name>
is the name of the script to be run on performing the operation defined by the parameter in the left part of the entry. In the current version of Virtuozzo, the following parameters are used to define what scripts should be executed for the corresponding Linux version a container is running:
-
ADD_IP
: the script specified as the value of this parameter has the default name of<distribution_name>-add_ip.sh
and is used to configure the network settings during the container startup and the IP address(es) assignment. The script is launched inside the container on executing the following commands:prlctl start <CT_name> prlctl set <CT_name> --ipadd <IP_address> prlctl set <CT_name> --ipadd <IP_address> --ipdel all
-
DEL_IP
: the script specified as the value of this parameter has the default name of<distribution_name>-del_ip.sh
and is used to delete an existing IP address from the container. The script is launched inside the container on executing the following commands:prlctl set <CT_name> --ipdel <IP_address> prlctl set <CT_name> --ipdel all
-
SET_HOSTNAME
: the script specified as the value of this parameter has the default name of<distribution_name>-set_hostname.sh
and is used to configure the hostname of the container. The script is launched inside the container on executing the following command:prlctl set <CT_name> --hostname <name>
-
SET_DNS
: the script specified as the value of this parameter has the default name of<distribution_name>-set_dns.sh
and is used to configure DNS parameters in the/etc/resolv.conf
file. The script is launched inside the container on executing the following command:prlctl set <CT_name> --searchdomain <domain> --nameserver <IP_address>
-
SET_USERPASS
: the script specified as the value of this parameter has the default name of<distribution_name>-set_userpass.sh
and is used to add a new user or change the current password. The script is launched inside the container on executing the following command:prlctl set <CT_name> --userpasswd <user>:<passwd>
-
SET_UGID_QUOTA
: the script specified as the value of this parameter has the default name of<distribution_name>-set_ugid_quota.sh
and is used to set up per-user/group quota. The script is launched inside the container on executing the following command:prlctl set <CT_name> --quotaugidlimit <num>
-
POST_CREATE
: the script specified as the value of this parameter has the default name of<distribution_name>-postcreate.sh
and is used to perform certain tasks (e.g., to modify thecrontab
files) after the container creation. This script is launched on the server on executing the following command:prlctl create <CT_name>
-
POST_MIGRATE
: the script specified as the value of this parameter has the default name of<distribution_name>-post_migrate.sh
and is used to perform certain operations on the container where the physical server has been successfully migrated. This script is launched inside the container on executing the following command:vzp2v [
<options>
] --ctid <CT_name>
The scripts specified in distribution configuration files are located in the /usr/libexec/libvzctl/dists/scripts
directory on the server and executed on performing the aforementioned operations on the containers. After an operation has been initiated, the prlctl
or vzp2v
utility turns to the corresponding container configuration file, looks for the value of the DISTRIBUTION
variable or, if the latter is not present, of the OSTEMPLATE
variable in this file, and defines on their basis what Linux version the given container is running. After that, prlctl
reads the corresponding configuration file for the determined Linux version from the /usr/libexec/libvzctl/dists/
directory and executes the scripts specified in this file.
Note
|
Note: If no distribution is specified as the value of the |
Contained in the /etc/vz/pfcache.conf
file, memory and IOPS deduplication parameters allow you to tailor cache behavior and performance to your needs.
Name | Description | Default Value |
---|---|---|
|
The minimum number of file copies required for the file to become cacheable. Copies may exist in the same container or different containers. |
|
|
Minimal cacheable file size, bytes. Files smaller than this value will not be cached. |
|
|
Maximal cacheable file size, bytes. Files larger than this value will not be cached. |
|
|
Time between caching attempts, seconds. |
|
|
Memory and IOPS deduplication cache IO bandwidth limit, bps. Unlimited by default. |
|
|
Memory and IOPS deduplication cache IOPS limit. Unlimited by default. |
|
|
Logging verbosity. Messages are logged in the system log file |
|
|
The total number of memory pages used in containers:
|
|
|
Extra cache space to free up in addition to the requested space. In per cent of the requested space. Used with the |
|
In Virtuozzo, both traffic accounting and bandwidth management are based on network classes. The network classes’ definition file (/etc/vz/conf/networks_classes
) describes network classes that Virtuozzo recognizes. Currently, there can be up to 15 classes defined.
The lines in this file have the following format:
<class_ID> <IP_address>/<prefix_length>
where <class_ID>
defines the network class identifier, <IP_address>
defines the starting IP address, and <prefix_length>
defines the subnet mask. In pair <IP_address>
and <prefix_length>
define the range of IP addresses for this class. There may be several lines for each class. Classes should be defined after Class 1 and represent exceptions from the "matching-everything" rule of Class 1. Class 0 has a special meaning and defines the IP ranges for which no accounting is done (this server container addresses).
The definition of class 1 is required; any class except class 1 can be omitted. However, it is recommended to define class 0 correctly as it will improve performance. For example:
# HW node VPS's networks 0 10.10.10.0/24 0 10.10.15.0/24 # all IP("local" traffic) 1 0.0.0.0/0 # class 2 - "foreign" traffic #2 10.0.0.0/8 #2 11.0.0.0/8 # inside "foreign" network there # is a hole with "local" traffic #1 10.10.16.0/24
There is a number of kernel limits that should be set for the Virtuozzo software to work correctly. Virtuozzo is shipped with a tuned /etc/sysctl.conf
file. Understanding what parameters were changed is essential for running the required number of containers. Below is the contents of the /etc/sysctl.conf
file as shipped with Virtuozzo:
# Controls IP packet forwarding net.ipv4.ip_forward = 1 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 1 # Controls whether core dumps will append the PID to the core filename. # Useful for debugging multi-threaded applications. kernel.core_uses_pid = 1 # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1 # Disable netfilter on bridges. net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-arptables = 0 # Controls the default maxmimum size of a mesage queue kernel.msgmnb = 65536 # Controls the maximum size of a message, in bytes kernel.msgmax = 65536 # Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736 # Controls the maximum number of shared memory segments, in pages kernel.shmall = 4294967296 net.ipv6.conf.all.proxy_ndp=1 net.ipv4.conf.default.proxy_arp = 0 net.ipv4.conf.all.rp_filter = 0 fs.super-max = 2560 fs.file-max = 262144 kernel.fairsched-nodes-max = 1538 net.ipv4.neigh.default.gc_thresh2 = 2048 net.ipv4.neigh.default.gc_thresh3 = 4096 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv6.neigh.default.gc_thresh2 = 2048 net.ipv6.neigh.default.gc_thresh3 = 4096 net.nf_conntrack_max = 500000 fs.aio-max-nr = 1048576
Notice that some parameters of the kernel configuration depends on the maximum number of containers you plan to run. In the default configuration file, these numbers were calculated under the assumption the maximum container number is 512. If you plan to run another number of containers, it is recommended to recalculate net.ipv4.neigh.default.gc_thresh2
and net.ipv4.neigh.default.gc_thresh3
parameters as three per container plus 128…512. Keep the second parameter twice as great as the first one.
To apply the changes issue the following command:
# sysctl -p
Besides, it makes sense to set net.ipv4.tcp_use_sg
to 0
, since the corresponding "Scatter/gather IO" feature is not supported by the venet
device, used in Virtuozzo networking.
It is also worth mentioning that normally you should have forwarding turned on since the server forwards packets destined to or originated from containers.
The offline management configuration files located in the /etc/vzredirect.d
directory define various modes of container offline management by container administrators. One configuration file describes one offline management mode. In the current Virtuozzo version, two files are accessible: vzpp.conf
and vzpp-plesk.conf
. The first file defines the container offline management by means of Power Panel, and the second one by means of the same Power Panel with an integrated Plesk control panel.
There are two parameters in each of the files.
<parameter_name>=<parameter_value>
Name | Description | Example |
---|---|---|
|
This port must be entered in the address line of an Internet browser after the container IP address when managing the container by means of Power Panel or the Plesk control panel. |
|
|
The UUID of the container where the requests coming to the specified port will be redirected. |
|
This file (/etc/vztt/vztt.conf
) is the configuration file used by the vzpkg
utility when managing OS and application EZ templates.
<parameter_name>=<parameter_value>
Name | Description |
---|---|
|
The IP address or hostname of the caching proxy server to be used by the |
|
The IP address or hostname of the HTPP proxy server address, if you use this server. |
|
The user name used by the HTTP proxy server for your authentication. |
|
The password of the user specified in the |
|
Defines the period of time, in seconds, in the course of which the downloaded software packages in the |
|
List of comma-separated packages that are not to be installed or updated during the |
The /etc/vz/pcompact.conf
file is used by the pcompact
utility to compact virtual disks in containers.
<parameter_name>=<parameter_value>
Name | Description |
---|---|
|
Compact the virtual disk if unused space on it exceeds THRESHOLD percent of the ploop size. |
|
Reduce disk space to be compacted by DELTA percent of the ploop size. |
|
Perform or skip file system defragmentation. |
This section provides information on utilities that can be used to manage Virtuozzo parameters.
The prlsrvctl
command-line utility is used to perform management tasks on the hardware node and Virtuozzo. The tasks include getting the Virtuozzo information, modifying its preferences, installing a license, obtaining statistics and problem reports, and some others.
prlsrvctl [<command> [<options>] [-l, --login [<user>[:<passwd>]@]<server>[:<port>]]]
Name | Description |
---|---|
|
The command to execute. |
|
Command options. See individual commands for available options. |
|
Connect to the remote hardware node and execute a command there. If this parameter is omitted, the command will be executed on the local server. |
|
The name of the user used to log in to the remote server. |
|
The user password. If the password is omitted, you will be prompted to enter it. |
|
The remote server IP address or hostname and port number, If port number is omitted, the default port will be used. |
Note
|
Note: To display help, enter |
The command is used to back up all virtual environments on the node.
prlsrvctl backup [-f,--full] [-i,--incremental] [-s,--storage <user>[:<password>]@<server>[:<port>]] [--description <desc>] [-u,--uncompressed]
Name | Description |
---|---|
|
Creates a full backup of each virtual environment on the node. A full backup contains all the virtual environment data. |
|
Creates an incremental backup of each virtual environment on the node. An incremental backup contains only the files that were changed since the previous full or incremental backup. This is the default backup type. |
|
The host to store backup images at. |
|
Adds a description to each virtual environment backup. |
|
Does not compress backup images. |
Displays the hardware node and Virtuozzo configuration information.
prlsrvctl info
The information returned by the info
command includes the following:
-
Server ID and hostname.
-
Virtuozzo version number.
-
Default directory for storing virtual machine files.
-
Virtuozzo memory limits.
-
Virtuozzo minimum allowable security level.
-
Default directory for storing virtual machine backups.
-
Virtuozzo license information.
-
Server hardware configuration information.
-
Other miscellaneous info.
The prlsrvctl net
command is used to create and configure virtual networks.
Name | Description |
---|---|
|
Creates a new virtual network |
|
Configures the parameters of an existing virtual network. |
|
Removes an existing virtual network. |
|
List the available virtual networks. |
net add
Creates a new virtual network.
prlsrvctl net add <vnetwork_ID> [-i, --ifname <if>] [-m, --mac <mac_address>] [-t, --type <bridged|host-only>] [-d, --description <desc>] [--ip <IP_address>[/<mask>]] [--dhcp-server <on|off>] [--dhcp-ip <IP_address>] [--ip-scope-start <IP_address>] [--ip-scope-end <IP_address>] [--ip6 <IP_address>[/<mask>_]] [--dhcp6-server <on|off>] [--dhcp-ip6 <IP_address>] [--ip6-scope-start <IP_address>] [--ip6-scope-end <IP_address>]
Name | Description |
---|---|
|
A user-defined name that will identify the new virtual network. |
|
The name of a physical network adapter on the hardware node to which this virtual network should be bound. |
|
The MAC address of a virtual network adapter on the hardware node to which this virtual network should be bound. |
|
The type of the virtual network to create. Possible values are:
|
|
A user-defined description of the virtual network. Descriptions with white spaces must be enclosed in quotation marks. |
|
Set an IPv4/IPv6 address and subnet mask for the Virtuozzo virtual adapter. |
|
Enable or disable the Virtuozzo virtual DHCPv4/DHCPv6 server. |
|
Set an IPv4/IPv6 address for the Virtuozzo virtual DHCPv4/DHCPv6 server. |
|
Set the starting and ending IPv4/IPv6 addresses for the DHCPv4/DHCPv6 pool. The virtual machines and containers connected to the network you are creating will automatically receive their IPv4/IPv6 addresses from the respective DHCPv4/DHCPv6 pool. |
net set
Configures the settings of an existing virtual network.
prlsrvctl net set <vnetwork_ID> [-i, --ifname <if>] [-m, --mac <mac_address>] [-t, --type <bridged|host-only>] [-d, --description <desc>] [--ip <IP_address>[/<mask>]] [--dhcp-server <on|off>] [--dhcp-ip <IP_address>] [--ip-scope-start <IP_address>] [--ip-scope-end <IP_address>] [--ip6 <IP_address>[/<mask>_]] [--dhcp6-server <on|off>] [--dhcp-ip6 <IP_address>] [--ip6-scope-start <IP_address>] [--ip6-scope-end <IP_address>]
Name | Description |
---|---|
|
The name of the virtual network to modify. |
|
The name of a physical network adapter on the hardware node to which this virtual network should be bound. |
|
The MAC address of a virtual network adapter on the hardware node to which this virtual network should be bound. |
|
The type of the virtual network to modify. Possible values are:
|
|
A user-defined description of the virtual network. Descriptions with white spaces must be enclosed in quotation marks. |
|
Set an IPv4/IPv6 address and subnet mask for the Virtuozzo virtual adapter. |
|
Enable or disable the Virtuozzo virtual DHCPv4/DHCPv6 server. |
|
Set an IPv4/IPv6 address for the Virtuozzo virtual DHCPv4/DHCPv6 server. |
|
Set the starting and ending IPv4/IPv6 addresses for the DHCPv4/DHCPv6 pool. The virtual machines and containers connected to the network you are creating will automatically receive their IPv4/IPv6 addresses from the respective DHCPv4/DHCPv6 pool. |
net del
Deletes an existing virtual network.
prlsrvctl net del <vnetwork_ID>
Name | Description |
---|---|
|
The name of the virtual network to delete. |
net list
Lists the existing virtual networks.
prlsrvctl net list
Generates and displays problem reports.
prlsrvctl problem-report
The command collects technical data about Virtuozzo and the hardware node and displays the report on screen (the output can also be piped to a file). The report can then be directed to the Virtuozzo technical support team for analysis.
Configures Virtuozzo preferences.
prlsrvctl set [--mem-limit <auto>|<size>] [-s, --min-security-level <low|normal|high>] [-c, --cep <on|off>] [--mng-settings <allow|deny>] [--device <device> --assignment <host|vm>_] [--backup-storage [<user>[:<passwd>]@]<server>[:<port>]] [--backup-tmpdir <tmp_dir>] [--backup-path <path>] [--idle-connection-timeout <timeout>] [--verbose-log <on|off>] [--cluster-mode <on|off>] [--cpu-features-mask <{+|-}feature1,feature2=value[,...]>] [--vm-cpulimit-type <full|guest>]
Name | Description | ||
---|---|---|---|
|
Sets the upper limit of the memory size that can be reserved for use by virtual machines. The following options are available:
|
||
|
The lowest allowable security level that can be used to connect to the hardware node. The following options are available:
|
||
|
Enables/disables the participation in the Customer Experience Program (CEP). The following options are available:
|
||
|
Allows to grant or deny permission to new users to modify Virtuozzo preferences. By default, only administrators of the host OS can modify Virtuozzo preferences. When a new user profile is created (this happens when a user logs in to the hardware node for the first time), he/she will be granted or denied this privilege based on the default setting. This parameter allows you to set that default setting. Please note that this parameter only affects new users (the users that will be created in the future). The profiles of the existing users will not be modified. |
||
|
Allows to set the assignment mode for the specified VTd device. The following options are available:
|
||
|
The default backup server where to store virtual machine backups. |
||
|
The name and path of the default directory on the backup server where to store virtual machine backups. |
||
|
Turns the verbose output for the command on or off. |
||
|
Turns the cluster mode on or off. |
||
|
Sets a timeout interval in seconds after which, if no data has been received from the storage server or backup client, the process of backup/restore is terminated. |
||
|
Specifies a temporary directory where special snapshots created during virtual machine backup will be stored. This may be necessary so as not to run out of storage space on physical servers where most of the storage space is allocated to virtual machines and very little is left for the server itself. |
||
|
Changes CPU features mask on the host. To mask/unmask features, use the
|
||
|
Specifies the type of virtual machine threads to be affected by the CPU limit:
With the
|
Shuts down the Virtuozzo component responsible for managing virtual machines and containers. No operations on virtual machines and containers are possible.
prlsrvctl shutdown [-f, --force]
Name | Description |
---|---|
|
Specifies whether the shutdown operation should be forced. If one or more virtual machines and containers are running, clients are connected, or some tasks are currently in progress, then forcing the shutdown will stop all processes automatically and will shut down the Virtuozzo component. |
The prlsrvctl usb
command is used to permanently assign a USB device to a specific virtual machine. A permanently assigned USB device will be connected to the virtual machine automatically on server restart. This functionality works only with virtual machines (not containers).
Name | Description |
---|---|
|
Lists USB devices connected to the server together with the information about their virtual machine assignments for the current user. |
|
Permanently assigns a USB device to the specified virtual machine. |
|
Removes a previously created USB device assignment. |
usb list
Lists the USB devices connected to the physical server.
prlsrvctl usb list
Returns a list of USB devices in tabular format with the following columns:
-
Name - the USB device name.
-
ID - a string that uniquely identifies the USB devices on the physical server. The ID never changes even if the device is disconnected from the server and then reconnected again. Please note that if a device ID is listed in quotes, they are a part of the ID and must be included in other calls that use it as an input parameter.
-
VM UUID - a universally unique ID of the virtual machine to which this USB device is permanently assigned. If a USB device is not assigned to any virtual machine, this column will be empty.
usb set
Permanently assigns a USB device to the specified virtual machine. A permanently assigned USB device will be connected to the virtual machine automatically on server restart. The USB device assignment is performed for the current user only. Other users may create their own USB device assignments. This functionality works only with virtual machines (not containers).
prlsrvctl usb set <usb\_dev\_ID> <VM_name>
Name | Description |
---|---|
|
The USB device ID. To obtain the list of USB devices connected to the server use the |
|
The name of the virtual machine to which to assign the USB device. |
usb del
Deletes a USB device assignment previously created with the usb set
command. The USB device assignment is performed on the user level, so if you remove an assignment, it will only be removed for the current user. Other users may have their own USB devices assignments, which will not be affected.
prlsrvctl usb del <usb_dev_ID>
Name | Description |
---|---|
|
The USB device ID. To see the current USB device assignments for the current user use the |
Displays the list of Virtuozzo users. Only those users are displayed who has created at least one virtual machine and container.
prlsrvctl user list [-o, --output <name|mng_settings|def_vm_home>]
Name | Description |
---|---|
|
Fields to include in the output. The following fields are available:
The fields must be specified in lowercase. |
Configures the profile of the user currently logged in to the Virtuozzo server.
prlsrvctl user set [--def-vm-home <path>]
Name | Description |
---|---|
|
The default virtual machine and container directory name and path. |
The prlsrvctl privnet
command is used to manage private networks on physical servers.
Name | Description |
---|---|
|
Creates a new private network. |
|
Configures the parameters of an existing private network. |
|
Removes an existing private network. |
|
Lists the available private networks. |
add
Creates a new private network.
prlsrvctl privnet add <private_network_ID> [-a, --ipadd <addr>[/<mask>]] [--global <yes|no>]
Name | Description |
---|---|
|
The private network ID. |
|
Add a subnet to the private network. The network can have multiple subnets. |
|
Make the private network weak, allowing access to and from external networks. |
set
Configures an existing private network.
prlsrvctl privnet set <private_network_ID> [-a, --ipadd <addr>[/<mask>]] [-d, --ipdel <addr>[/<mask>]] [--global <yes|no>]
Name | Description |
---|---|
|
The private network ID. |
|
Add a subnet to the private network. The network can have multiple subnets. |
|
Delete the specified subnet from the private network. |
|
Make the specified private network weak, allowing access to and from external networks. |
del
Deletes a private network from the physical server.
prlsrvctl privnet del <private_network_ID>
Name | Description |
---|---|
|
The ID of the private network to delete. |
list
Lists the private networks that exist on the physical server.
prlsrvctl privnet list
Virtuozzo containers can be managed using the prlctl
command-line utility. The utility is installed on the hardware node during the product installation.
The table below contains the full list of Virtuozzo command-line utilities and command you can use for managing containers.
Name | Description |
---|---|
|
Utility to control containers. |
|
Utility to view a list of containers existing on the server with additional information. |
Name | Description |
---|---|
|
Command for the local cloning of containers. |
Name | Description |
---|---|
|
Command to back up individual containers. |
|
Command to restore individual containers. |
Name | Description |
---|---|
|
Utility to manage OS and application EZ templates either inside your containers or on the server itself. |
Name | Description |
---|---|
|
Utilities working as the standard |
|
Utility that prints container UUID the process belongs to. |
|
Utility to generate container configuration file sample, "splitting" the server into equal parts. |
|
Memory and IOPS deduplication management utility. |
|
Utility to compact containers by removing unused blocks from their virtual disks. |
prlctl
is the primary tool for container management. To use it, you have to log in to the server as the root user.
prlctl <subcommand> <CT_name> prlctl --version prlctl --help
Name | Description |
---|---|
|
Creates a new container. |
|
Deletes a container. |
|
Mounts the container private area and executes the container mount script. |
|
Unmounts the container private area and executes the unmount script. |
|
Starts a container. |
|
Stops a container. |
|
Restarts a container. |
|
Displays the container status. |
|
Sets container parameters: resource control settings, hostname, IP addresses, and so on. |
|
Logs in to a container without knowing its root password. |
|
Runs arbitrary commands in a container without logging in to it. |
|
Saves the state of a running container in a dump file. |
|
Restores a container from its dump file. |
|
Creates and manages container snapshots. |
|
Creates a command prompt channel to a container. |
Name | Description |
---|---|
|
Displays the |
|
Displays the usage information about |
Creates a command prompt channel to a container. Allows to log in to and execute commands in running containers; provides container startup/shutdown information that may be used for troubleshooting purposes. Logging in to containers requires a virtual terminal (e.g., mingetty) to be installed in the container.
Note
|
Note: To exit the console, press Esc and then . (period). |
prlctl console <CT_name>
Name | Description |
---|---|
|
Container name. |
This command is used to create new containers.
prlctl create <CT_name> --vmtype ct [<options>]
With this command, you can create regular containers. A unique container name is required for this command.
Name | Description |
---|---|
|
An arbitrary name to assign to the new container. |
|
Tells the |
|
OS EZ template to use for creating the container. If omitted, this value is taken from the |
|
Container sample configuration file to use for creating the container. Sample configuration files are located in |
|
A custom UUID to assign to the container. |
Deletes a container from the server.
prlctl delete <CT_name>
Name | Description |
---|---|
|
Container name. |
When executed, prlctl delete
physically removes all the files located in the container private area (specified as the VE_PRIVATE
variable in the container configuration file) and renames the container configuration file in /etc/vz/conf
from <CT_name>.conf
to <CT_name>.conf.destroyed
. It also renames container action scripts, if any, in a similar manner.
Note
|
Note: A container must be stopped before its private area can be unmounted. |
Allow running arbitrary commands in a container.
prlctl exec <CT_name> [--without-shell] <command> prlctl enter <CT_name>
where <command>
is a string to be executed in the container. If <command>
is specified as -
, then the commands for execution will be read from the standard input until the end of file or exit
is encountered.
Name | Description |
---|---|
|
Container name. |
|
Run commands directly without |
When using prlctl exec
, remember that the shell parses the command-line and, if your command has shell metacharacters in it, you should escape or quote them.
The prlctl enter
command is similar to prlctl exec /bin/bash
. The difference between the two is that prlctl enter
makes the shell interpreter believe that it is connected to a terminal. As such, you receive a shell prompt and are able to execute multiple commands as if you were logged in to the container.
The prlctl mount
command mounts the container private area to the container root directory (/vz/root/<CT_name>
on the server) without starting it. Normally, you do not have to use this command as the prlctl start
command mounts the container private area automatically.
The prlctl umount
command unmounts the container private area. Usually, there is no need in using this command either because prlctl stop
unmounts the container private area automatically.
prlctl mount <CT_name> prlctl umount <CT_name>
Name | Description |
---|---|
|
Container name. |
Moves container’s private area to a new location on the same server. The container can be stopped, suspended or running.
prlctl move <CT_name> --dst=<path>
Name | Description |
---|---|
|
Container name. |
|
Path to container’s new private area. |
Generates a problem report for the specified container and either sends it to the Virtuozzo technical support team or displays it on the screen.
prlctl problem-report <CT_name> <-d, --dump|-s, --send [--proxy [<user> \ [:<passwd>]@<proxyhost>[:<port>]]] [--no-proxy]>
Name | Description |
---|---|
|
The name of the container for which to generate the problem report. |
|
Collect technical data about the specified container and display it on the screen. You can also pipe the output to a file and then send it to the Virtuozzo technical support team to analyze your problem. |
|
Send the generated problem report to the Virtuozzo technical support team. |
|
Use the specified information to send the generated report through a proxy server, if you use one to connect to the Internet. |
|
Do not use a proxy server to send the generated report. This is the default behavior, so you can omit this parameter. |
The register
command is used to register a container with Virtuozzo.
The unregister
command removes a container from the Virtuozzo registry.
prlctl register <path> [--preserve-uuid <yes|no>] prlctl unregister <CT_name>
Name | Description | ||
---|---|---|---|
|
Full path to the container directory. |
||
|
The name of the container to remove from the Virtuozzo registry. |
||
|
Specifies what to do with the container UUID (universally unique identifier). If you specify
|
-
Use the
register
command when you have a container on the server that does not show up in the list of the containers registered with the Virtuozzo. This can be a container that was previously removed from the registry or that was copied from another location. -
The
unregister
command removes a container from the Virtuozzo registry, but does not delete the container files from the server. You can re-register the container later using theregister
command.
Recreates a container from scratch according to its configuration file. Copies old private area content to the /vz/root/<CT_name>/old
directory.
prlctl reinstall <CT_name> [--skipbackup] [--resetpwdb] [--scripts <script> [...]] prlctl reinstall <CT_name> [--listscripts] [--desc]
Name | Description |
---|---|
|
Container name. |
|
Removes container’s user database and creates a clean database as for any new installation. |
|
Does not save the old private area contents to the |
|
Specifies the scripts to be executed during reinstallation. These scripts are used to customize application templates in the new container and bring them to the same state as in the old container. By default, all available scripts are executed. |
|
Lists the scripts to be executed during container reinstallation. |
|
Displays the description of the scripts to be executed during container reinstallation. Used together with the |
Note
|
Note: Currently, the |
This command is used for setting container parameters.
prlctl set <CT_name> <option> <value>
where <CT_name> is container name.
The command options specified in this file can be subdivided into the following categories:
-
miscellaneous
-
networking
-
resource management
-
hard disk drive management
The table below lists the general options you can use with prlctl set
.
Name | Description | ||
---|---|---|---|
|
Set to |
||
|
Enabling/disabling the direct managing of the container through a common Internet browser by means of Power Panels and the Plesk control panel (as defined by the |
||
|
Defines whether the container can be managed by means of Power Panel or Plesk or both. Valid only if the |
||
|
This setting creates a new user with the specified password in the container, or changes the password of an already existing user. This command modifies not the container configuration file, but the |
||
|
Used with |
||
|
Enables/disables the support for the following functionality inside the container:
|
||
|
Changes the container name. You can change the names of both stopped and running containers. |
||
|
Custom container description. Descriptions must be alphanumeric. Descriptions with white spaces must be enclosed in quotation marks. |
||
|
Enables or disables access to the container via the VNC protocol. |
||
|
Sets the VNC port number for the container. Used with |
||
|
Sets the VNC password for the container or specifies that no password is needed for VNC connections. Either of these options is mandatory for any VNC setup. |
||
|
Enables or disables compaction for all disks in the container.
|
Resource management options control the amount of resources a container may consume. If the setting has bar:lim
after it than this setting requires specifying both barrier and limit values separated by colons.
Name | Description |
---|---|
|
This option lets you set the resource parameters for the container not one by one, but by reading them from the container sample configuration file. All container sample configuration files are located in the |
|
CPU weight. This is a positive integer number that defines how much CPU time the container can get as compared to the other virtual machines and containers running on the server. The larger the number, the more CPU time the container can receive. Possible values range from 8 to 500000. If this parameter is not set, the default value of 1000 is used. |
|
CPU limit, in per cent or megahertz (MHz), the container is not allowed to exceed. This parameter is not set for newly created containers; so they can consume all free CPU power of the server. By default, the limit is set in percent. To set the limit in MHz, specify |
|
Number of CPU cores defining the CPU limit for a container. The limit is calculated by multiplying the power of one CPU core by the number of the specified CPU cores. This option also defines the number of CPUs shown to container users. This parameter is not set for newly created containers; so they can consume all free CPU power of the server. |
|
CPU affinity mask. This mask defines the CPUs on the server that can be used to handle the processes running in the container. The CPU mask can be specified as both separate CPU index numbers (1,2,3) and CPU ranges (2-4,5-7). |
|
The NUMA node mask defining a NUMA node to bind the container to. Once you set the mask, the processes running in the container will be executed only on the CPUs that belong to the specified NUMA node. |
|
Total disk space consumed by the container, in megabytes. You can use the following suffixes to specify measurement units:
|
|
Enables (if set to a value other than
|
|
The container priority for disk I/O operations. The allowed range of values is |
|
The bandwidth a container is allowed to use for its disk input and output (I/O) operations. By default, the limit is set in megabytes per second. You can use the following suffixes to specify measurement units:
In the current version of Virtuozzo, the maximum I/O bandwidth limit you can set for a container is 2 GB per second. The default I/O bandwidth limit for all newly created containers is set to 0, which means that no limits are applied to any containers. |
|
The maximum number of disk input and output operations per second a container is allowed to perform. By default, any newly created container does not have the IOPS limit set and can perform so many disk I/O operations per second as necessary. |
|
If traffic shaping is turned on, then this parameter specifies bandwidth guarantee for the container. The format is |
|
If set to "yes", the bandwidth guarantee is also the limit for the container and the container cannot borrow the bandwidth from the |
|
The amount of RAM that can be used by the processes of a container, in megabytes. You can use the following suffixes to specify measurement units:
|
|
Sets a percentage of container’s RAM that said container is guaranteed to have. By default, set to 0%. |
|
The amount of swap space that can be used by the container for swapping out memory once the RAM is exceeded, in 4KB pages. You can use the following suffixes to specify measurement units:
|
|
The amount of swap space that can be used by the container for swapping out memory once the RAM is exceeded, in bytes. You can use the following suffixes to specify measurement units:
|
Network-related options allow you to set the hostname, the domain to search when a not fully qualified domain name is used, the DNS server address and the IP addresses (both IPv4 and IPv6) that container can use, and other parameters.
Name | Description | ||
---|---|---|---|
|
Sets the hostname to the specified name. |
||
|
Adds an IP address to a list of IP addresses the container can use and brings up the network interface with this address inside the container. If used with the |
||
|
Assigns the IP address and network mask to the container.
|
||
|
Allows you to revoke IP address from the container. If "all" is used instead of IP address than all IP addresses will be revoked. If used with the |
||
|
The DNS server IP address for the container. If used with the |
||
|
The DNS search domain for the container. More than one domain may be specified. |
||
|
Indicates which
|
||
|
Creates a new
Only the Ethernet interface name ( |
||
|
Removes the |
||
|
Specifies the name of the |
||
|
The MAC address to be assigned to the |
||
|
The MAC address to be assigned to the |
||
|
The name to be assigned to the |
||
|
Connects the |
||
|
Specifies whether the virtual network adapter should obtain the IPv4 settings through a DHCP server. |
||
|
Specifies whether the virtual network adapter should obtain the IPv6 settings through a DHCP server. |
||
|
The default gateway to be used by the container. |
||
|
The default IPv6 gateway to be used by the container. |
||
|
If set to |
||
|
If set to |
This group of options is used to manage virtual hard disks in a container.
prlctl set <CT_name> --device-add hdd [--image <file>] [--size <size>] [--mnt <path>] [--iface <ide|scsi|virtio>] [--position <pos>] prlctl set <CT_name> --device-set hdd<N> [--image <file>] [--size +<size>] [--mnt <path>] [--iface <ide|scsi|virtio>] [--position <pos>] [--autocompact <on|off>] prlctl set <CT_name> --backup-add <backup_ID> [--disk <disk_name>] prlctl set <CT_name> --device-del hdd<N> [--detach-only|--destroy-image] prlctl set <CT_name> --backup-del {<backup_ID>|all}
Name | Description | ||
---|---|---|---|
|
Container name. |
||
|
Adds a virtual hard disk to the container. If no other options are specified, the command creates a new unmounted disk with the following parameters:
|
||
|
Modifies the parameters of the virtual hard disk
|
||
|
Specifies an image file that will be used to emulate the virtual disk.
|
||
|
Specifies the size of the virtual hard disk, in megabytes. |
||
|
Specifies the mount point of the virtual hard disk inside the container. A corresponding entry is also added to container’s |
||
|
Enables or disables compaction for the specified disk in the container.
|
||
|
Attach the backup with the identifier |
||
|
Used with |
||
|
Deletes a virtual hard disk from the stopped container. |
||
|
Removes the virtual disk from the container configuration but leaves its image file intact. |
||
|
Removes the virtual disk from the container configuration and deletes its image file. |
||
|
Detach either the backup with the identifier |
Takes, displays, reverts to, and deletes container snapshots.
prlctl snapshot <CT_name> [-n, --name <name>] [-d, --description <desc>] prlctl snapshot-list <CT_name> [-t, --tree] [-i, --id <snapshot_ID>] prlctl snapshot-switch <CT_name> -i, --id <snapshot_ID> prlctl snapshot-delete <CT_name> -i, --id <snapshot_ID>
Name | Description |
---|---|
|
Container name. |
|
User-defined snapshot name. Names with white spaces must be enclosed in quotation marks. |
|
User-defined snapshot description. Descriptions with white spaces must be enclosed in quotation marks. |
|
Displays the snapshot list as a tree. The default display format is tabular with Parent Snapshot ID and Snapshot ID as columns. |
|
|
Note
|
Note: If the snapshot you want to delete has children snapshots derived from it, they will not be deleted. |
These commands start, stop, restart, and show the current state of containers, respectively.
prlctl start <CT_name> [--wait] prlctl stop <CT_name> [--fast] prlctl restart <CT_name> prlctl status <CT_name>
Name | Description |
---|---|
|
Container 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.
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.
When starting or stopping a container, prlctl
executes a number of helper scripts located in the /vz/private/<CT_UUID>/scripts
and /usr/libexec/libvzctl/scripts/
directories.
Name | Description |
---|---|
|
This script is expected to create the container private area from a private area template. |
|
This script sets up the necessary routing entries for container IP addresses and adds public ARP records on all interfaces. |
|
This script deletes routing entries and ARP records for container IP addresses from all interfaces. |
|
This configuration script is executed after a PCI device is added to or removed from a container. |
|
This script configures the network traffic shaping for a container. |
|
This script is called just before a container is started and used to perform any additional setup of the container, such as network setup. |
|
This script is called just after a container is shut down and can be used to perform any additional cleanup of the container, such as network cleanup. |
Use action scripts vz-start
/vz-stop
to perform actions during container startup/shutdown. To add more functionality to other shipped scripts, create a new script and add a call to it to a shipped script. Doing so will facilitate upgrades to future versions of Virtuozzo.
The prlctl restart <CT_name>
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.
The prlctl suspend
command is used to save the state of a running container.
prlctl suspend <CT_name>
Name | Description |
---|---|
|
Container name. |
During the prlctl suspend
execution, the current container state is saved to a special dump file and the container itself is stopped. The created dump file is saved to the Dump
file in the /vz/private/<CT_UUID>/dump
directory on the server.
The prlctl resume
command is used to restore the container from its dump file created with the prlctl suspend
command.
prlctl resume <CT_name>
When executed, prlctl resume
searches for the Dump
file in the /vz/private/<CT_UUID>/dump
directory on the server and restores the container from this file.You can restore the container dump file on the Source Server, i.e. on the server where this container was running before its dumping, or transfer the dump file to another server and restore it there.
Note
|
Note: Before restoring a container from its dump file, make sure that the file system on the Destination Server is identical to that at the moment of the container dumping. Otherwise, the container restoration may fail. |
Displays a list of containers on the Hardware Node. Displays information on containers on the Hardware Node.
prlctl list --vmtype ct [-a, --all] [-o, --output <field>[,...]] [-s, --sort <field>|-<field>] [-t, --template] [-j, --json] prlctl list -i, --info --vmtype ct [<CT_name>] [-f, --full] [-t, --template] [-j, --json]
Name | Description |
---|---|
|
List all running, stopped, suspended, and paused containers. If this and the rest of the parameters are omitted, only the running containers will be displayed. |
|
List available container templates instead of actual containers. |
|
Display only the specified fields. Type field names in lower case. Separate multiple fields with commas. For the list of fields, see [_prlctl_list_output_parameters]. |
|
Sort containers by the specified field in either ascending or descending order. |
|
Display detailed information about the specified container. |
|
Display detailed information about network cards in containers. Used with the |
|
Thename of the container for which to display the detailed information. If not specified, the information will be displayed for all registered containers. |
|
Produce machine-readable output in the JSON format. |
Listed below are the parameters that can be specified after the -o
switch.
Name | Output Column | Description |
---|---|---|
|
|
Container UUID. |
|
|
Container hostname. |
|
|
Container name. |
|
|
Container description. |
|
|
Specifies the name of the OS template your container is based on (e.g., |
|
|
Container IP address. |
|
|
Container status (e.g., running or stopped). |
|
|
The number of processes and threads allowed. |
|
|
Network device’s MAC address. |
|
|
Network devices in the container. |
|
|
The bandwidth a container is allowed to use for its disk input and output (I/O) operation, in bytes per second. |
|
|
Indicates whether the container is joined to the High Availability Cluster. |
|
|
Container priority in the High Availability Cluster (0 is the lowest). Higher-priority virtual environments are restarted first in case of failures. |
This section describes the utilities you can use to move/clone containers within the same server.
Creates an exact copy of the specified container.
prlctl clone <CT_name> --name <new_name> [--template] [--dst=<path>]
Name | Description |
---|---|
|
Name of the container to clone. |
|
Name to be assigned to the new container. |
|
Create a container template instead of a clone. Template cannot be started. |
|
Full path to the directory for storing the contents of the cloned container. If this parameter is omitted, the clone is created in the default directory. |
Any container is defined by its private area, configuration files, action scripts, and quota information. Backing up these components allows you to restore all the content of a container on any Virtuozzo-based system at any time if the container gets broken.
Creates, lists, deletes or restores container backups.
prlctl backup <CT_name> [-f, --full] [-i, --incremental] [--description <desc>] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]] [--no-compression] prlctl backup-list [<CT_name>] [-f, --full] [--localvms] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]] prlctl backup-delete {<CT_name> | -t, --tag <backup_ID>} prlctl restore {<CT_name> | -t, --tag <backup_ID>} [-n, --name <new_name>] [--dst=<path>] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]]
Name | Description |
---|---|
|
Container name.
|
|
Specifies a remote backup server address, port, and credentials. If this option is omitted, the backup will be saved on the default backup server that can be configured using the prlsrvctl set command. |
|
Backup description. Descriptions with white spaces must be enclosed in quotation marks. |
|
|
|
Create an incremental backup of the container. An incremental backup contains only the files changed since the previous full or incremental backup. This is the default backup type. |
|
List local backups only. |
|
The ID of the backup to restore or delete. |
|
A new name to assign to the restored container. If this option is omitted, the container will be restored with the original name. |
|
Restore the container to the specified directory on the server. If this option is omitted, the container will be restored to |
|
Does not compress a backup image during its creation. |
This section described the utilities you can use to manage OS and application templates.
The vzpkg
utility is used to manage OS and application EZ templates either inside your containers or on the server itself. This tool can also be used to manage standard software packages (e.g., mysql.rpm
) inside containers.
vzpkg <command> [<options>] {<CT_name>|<object>} vzpkg --help
Name | Description |
---|---|
|
Installs OS and application EZ templates on the server. |
|
Updates OS and application EZ templates installed on the server. |
|
Removes OS and application EZ templates from the server. |
|
Outputs a list of EZ templates, OS template caches with preinstalled application templates, or software packages either on the server or inside a particular container. |
|
Outputs information on any EZ templates or software packages available on the server or inside the container. |
|
Outputs information on updates for the packages installed inside a container. |
|
Adds application EZ templates to or to install software packages inside the container. |
|
Updates application EZ templates and software packages inside the container. |
|
Removes application EZ templates or software packages from the container. |
|
Creates a tarball (cache) for the given OS EZ template. |
|
Updates the existing tarball (cache) for the given OS EZ template. |
|
Removes a tarball (cache) for the given OS EZ template. |
|
Creates a cache of an OS EZ template with preinstalled application templates. |
|
Updates or recreates a cache of an OS EZ template with preinstalled application templates. |
|
Removes a cache of an OS EZ template with preinstalled application templates. |
|
Installs a software package inside a container from the corresponding file on the server. |
|
Updates the software packages installed inside your container(s) by means of the |
|
Upgrades an OS EZ template the container is based on to a newer version. |
|
Downloads packages included in EZ templates to the server and to store them in the |
|
Removes all locally cached data from the template directories on the server. |
|
Updates the local metadata on the server. |
This command is used to install an OS or application EZ template on the server from an RPM package or Virtuozzo repositories.
vzpkg install template [<options>] <object> [...]
where <object>
is a path to an RPM package or an EZ template name.
Name | Description |
---|---|
|
Disables logging to the screen and to the log file. |
|
Forces installation of the EZ template on the server. |
Note
|
Note: To install multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces. |
This command is used to update an OS or application EZ template on the server from an RPM package or Virtuozzo repositories.
vzpkg update template [<options>] <object> [...]
where <object>
is a path to an RPM package or an EZ template name.
Name | Description |
---|---|
|
Disables logging to the screen and to the log file. |
|
Forces update of the EZ template. |
Note
|
Note: To update multiple EZ templates, specify multiple RPM package or EZ template names separated by white spaces. |
This command removes an OS or application EZ template from the server.
vzpkg remove template [<options>] <template_name> [...]
Name | Description |
---|---|
|
Specifies the OS EZ template to delete the application EZ template from. |
|
Disables logging to screen and file. |
|
Forces deletion of the EZ template. |
When executed, the vzpkg remove template
command removes the specified OS EZ template from the server. To delete an application EZ template, additionally specify the name of the OS EZ template (<OS_template>
) under which this application template is to be run.
The vzpkg list
command is used to list
-
EZ templates installed on the server, in a container, or available in remote EZ template repositories
-
YUM software groups or individual packages installed in a container
vzpkg list [<options>] [<OS_template>|<CT_name> [...]]
If you indicate a container name, the command will list all EZ templates applied to the specified container. If you indicate an OS EZ template, vzpkg list
will display a list of application EZ templates available for this OS EZ template. Without any options, the utility lists all EZ templates installed on the server.
Name | Description |
---|---|
|
Lists the software packages installed in the container or included in the OS EZ template. |
|
Lists the YUM software groups installed in the container or available for the OS EZ template. The |
|
Displays the OS EZ template the container is based on. |
|
Displays the application EZ templates installed in the container or included in the OS EZ template. |
|
Lists the packages included in the specified EZ template or applied to the specified container from the local |
|
If the elapsed time from the last |
|
Displays a list of packages that are applied to the specified container but absent from the repository set to handle the EZ template(s) where these packages are included. |
|
Displays the ID assigned to the EZ template instead of its name; these IDs are unique within the given system. If the |
|
In addition to listing the EZ templates available either in the container (if the |
|
This option has no effect if the |
|
Outputs a list of OS EZ template caches with preinstalled applications. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
This command displays information about EZ templates, YUM software packages, and individual software packages.
vzpkg info [-F {<OS_template>|<CT_name>} -q|-d <app_template> [<parameters> ...] vzpkg info -p|-g [-C|-r] [-F {<OS_template>|<CT_name>} -q|-d {<package_name>|<yum_package_group>} [<parameters> [...]]
Name | Description |
---|---|
|
Container name. |
|
OS EZ template. |
|
Application EZ template. |
|
Software package name. |
|
YUM software group name. |
|
Displays information on the application EZ template or the software package (if the |
|
Displays information about the specified software package. Must be used with the |
|
Displays information about the packages included in the specified YUM software group. |
|
Displays the information on the specified package from the local |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
While executed, vzpkg info
parses the subdirectories and files located in the /vz/template/<os_name>/<os_version>/<arch>/config
directory and containing the EZ template meta data. To run the command, you should specify either the OS EZ template or the container name. In either case, detailed information on the corresponding OS EZ template is displayed. You can also use the -F
option to get the necessary information on any application EZ template included into the OS EZ template or applied to the container.
By default, vzpkg info
displays all meta data on the EZ template/package specified. However, you can reduce the amount of the output information by using special parameters (<parameters>
) listed in the table below.
Name | Description |
---|---|
|
The name of the EZ template/package. |
|
The packages included in the EZ template. For EZ templates only. |
|
The repository where the packages comprising the EZ template are stored. For EZ templates only. |
|
The URL to the file containing a list of repositories from where the packages comprising the EZ template are to be downloaded. For EZ templates only. |
|
The Linux distribution on the basis the OS EZ template has been created or under which the application EZ template is to be run. For EZ templates only. |
|
Brief information on the EZ template/package. |
|
Detailed information on the EZ template/package. As distinct from |
|
For EZ templates only. Displays the following information:
|
|
The version of the software package. |
|
The release of the software package. |
|
The system architecture where the EZ template/package is to be used. It can be one of the following:
|
|
Displays the path to the EZ template configuration directory containing the template meta data where the meta data for the base OS EZ template are stored (the default directory path is |
|
For EZ templates only. The packaging system used to handle the packages included in the specified EZ template. It can be one of the following:
|
|
The package manager type for managing the packages included in the specified EZ template. It can be one of the following: x86 Linux distributions
x86-64 Linux distributions
|
This command is used to check the status of the packages either installed inside a container or included in an OS EZ template.
vzpkg status [<options>] {<CT_name>|<OS_template>}
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, the command performs the following operations:
-
Checks all the packages installed inside the specified container or included in the specified OS EZ template.
-
Checks the repository used to install/update packages inside the container/OS EZ template.
-
Compares the packages in the repository with those inside the container/OS EZ template.
-
Lists the found packages updates for the container/OS EZ template, if any, or informs you that the container/OS EZ template is up-to-date.
Note
|
Note: The |
This command is used to install application EZ templates, YUM software groups, or individual software packages into containers.
vzpkg install [<options>] <CT_name> <object> [...]
The vzpkg install
command will add an <object>
to the specified container. An object can be an application EZ template, a YUM software group, or a standard software package. You can specify several objects to install into the container by separating them by spaces.
When executed, vzpkg install
automatically handles the interdependencies among the packages to be installed into a container and ensures that all dependencies are satisfied. If the package dependencies cannot be resolved, the installation process fails and the corresponding message is displayed.
Name | Description |
---|---|
|
Installs a software package instead of an EZ template. |
|
Installs a YUM software group instead of an EZ template. The |
|
Forces the EZ template/package installation. |
|
Makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, the specified object is treated by vzpkg install
as an application EZ template. However, you can use the -p
or -g
option to explicitly specify the type of the object.
Note
|
Note: A container has to be running in order to apply an application EZ template to or install a package inside this container. |
The vzpkg update
command is used to update the following components of a container:
-
OS EZ template
-
application EZ templates
-
YUM software groups
-
individual software packages
vzpkg update [<options>] <CT_name> [<object> [...]]
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Updates the packages installed in the container by using the |
|
Updates the YUM software group in the container. The |
|
Forces the EZ template/package update procedure. |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
Without any options specified, vzpkg update
updates all EZ templates (including the OS EZ template) in the specified container. However, you can make the command update a particular EZ template by specifying its name as <object>
. You can also use the -p
or -g
option to update YUM software groups or individual software packages in the container.
This command is used to remove an application EZ template, YUM software group, or a software package from a container.
vzpkg remove [<options>] <CT_name> <object> [...]
This command will remove <object>
from the container with the name <CT_name>
. The <object>
can be an application EZ template, a YUM software group, or a software package installed with the vzpkg install
command. You may specify a number of objects for removing.
Name | Description |
---|---|
|
Removes the specified package(s) from the container. |
|
Removes the specified YUM software group from the container. The |
|
Removes also the packages having dependencies with the object specified. |
|
Forces the EZ template/package deletion. |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, the specified object is treated by vzpkg remove
as an application EZ template. However, you can use the -p
or -g
option to explicitly specify the type of the object.
Note
|
Note: A container has to be running in order to remove an application EZ template/package from it. |
This command is used to create tarballs (caches) for OS EZ templates. You should execute this command before you start using a newly installed OS EZ template for creating containers.
vzpkg create cache [<options>] [<OS_template> [...]]
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
|
Forces the process of the cache creation. |
vzpkg create cache
checks the template area on the server (by default, the /vz/template
directory is used) and if it finds an OS EZ template for which no tar archive exists, it creates a gzipped tarball for the corresponding OS EZ template and places it to the /vz/template/cache
directory. When a container is being created, prlctl
just unpacks the tar archive.
By default, vzpkg create cache
checks the tar archive existence for all OS EZ templates installed on the server and creates some, if necessary. However, you can explicitly indicate what OS EZ template should be cached by specifying its name as <OS_template>
. If the cache of the OS template specified already exists on the server, the command will fail and you will be presented with the corresponding error message.
This command is used to update tarballs (caches) of the OS EZ templates installed on the server.
vzpkg update cache [<options>] [<OS_template> [...]]
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
The vzpkg update cache
command checks the cache directory in the template area (by default, the template area is located in the /vz/template
directory on the server) and updates all existing tarballs in this directory. However, you can explicitly indicate what OS EZ template tarball is to be updated by specifying its name as <OS_template>
. Upon the vzpkg update cache
execution, the old tarball is renamed by receiving the -old
suffix (e.g., centos-6-x86_64.tar.gz-old
).
If the vzpkg update cache
command does not find a tarball for one or more OS EZ templates installed on the server, it creates the corresponding tar archive(s) and puts them to the /vz/template/cache
directory.
This command removes the cache for the OS EZ templates specified.
vzpkg remove cache [<options>] [<OS_template> [...]]
Name | Description |
---|---|
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
By default, vzpkg remove cache
deletes all caches located in the /vz/template/cache
directory on the server. However, you can explicitly indicate what OS EZ template tar archive is to be removed by specifying its name as <OS_template>
.
Note
|
Note: The OS EZ template caches having the |
This command combines an OS EZ template cache and one or more application EZ templates into a new OS and applications cache. If the OS EZ template cache has not been created yet, this will be done before application templates are added.
vzpkg create appcache --config <config> [<options>]
Name | Description |
---|---|
|
Specifies the path to the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template to use in cache creation. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies one or more application EZ templates (comma-separated) to be added to the resulting cache.This option redefines the application EZ templates specified in the configuration file. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
This command updates an existing OS EZ template cache with preinstalled application templates if the --update-cache
option is provided. Otherwise, the cache is created anew.
vzpkg update appcache --config <config> [<options>]
Name | Description |
---|---|
|
Specifies the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template, cache of which needs to be recreated or updated. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies all application EZ templates (comma-separated) preinstalled in the cache which needs to be updated. This option redefines the application EZ templates specified in the configuration file. |
|
Instructs the command to check for updates for the existing OS and application cache. Otherwise, the cache is created anew. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
This command removes an existing OS EZ template cache with preinstalled application templates.
vzpkg remove appcache --config <config> [<options>]
Name | Description |
---|---|
|
Specifies the configuration file with the information on what OS and application templates to use. |
|
Specifies the OS EZ template, cache of which needs to be removed. This option redefines the OS EZ template specified in the configuration file. |
|
Specifies all application EZ templates (comma-separated) preinstalled in the cache which needs to be removed. This option redefines the application EZ templates specified in the configuration file. |
|
Sets the debugging level (0 to 10), 10 being the highest. |
|
Disables logging to screen and log file. |
|
Forces cache creation. |
The vzpkg localinstall
command is used to install a software package inside a container from the corresponding file on the server.
vzpkg localinstall [<options>] <CT_name> <rpm_file_path> [...]
Name | Description |
---|---|
|
When handling the package interdependencies, makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, the command installs the package, the full path to which is specified as <rpm_file_path>, inside the container with the name <CT_name>
. You may specify multiple packages to be installed inside the container.
During its execution, vzpkg localinstall
automatically handles the interdependencies among the packages to be installed inside a container and ensures that all dependencies are satisfied. If the package dependencies cannot be resolved, the installation process will fail and the corresponding message will be displayed.
The vzpkg localupdate
command is used to update the software packages installed inside your container(s) by means of the vzpkg install
or vzpkg localinstall
commands.
vzpkg localupdate [<options>] <CT_name> <rpm_file_path> [...]
Name | Description |
---|---|
|
When handling the package interdependencies, makes the |
|
If the elapsed time from the last |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed, vzpkg localupdate
compares the file on the server the full path to which is specified as <rpm_file_path>
with the corresponding package inside the container with the name <CT_name>
and updates it, if necessary. You may specify a number of packages at once to be updated inside your container.
The vzpkg upgrade
command is used to upgrade an OS EZ template the container is based on to a newer version.
vzpkg upgrade [<options>] <CT_name>
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last local |
|
Simulates the same operations as |
|
Forces the upgrade of the OS EZ template. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
This command is used to download packages included in the corresponding OS EZ template or their updates from the remote repository to the vzpkg
local cache on the server and to prepare them for installation.
vzpkg fetch [<options>] <OS_template>
Name | Description |
---|---|
|
Download packages/updates for the specified EZ OS template. |
|
Download packages/updates for EZ application templates used with the EZ specified OS template. |
|
Makes the |
|
If the elapsed time from the last |
|
Forces the process of downloading packages and/or their updates to the server. |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
You can make vzpkg fetch
run as a cron
job (e.g., nightly) checking for available packages or packages updates for your EZ templates and keeping them in the local cache. Having all the necessary packages in the vzpkg
local cache can greatly speed up the execution of the vzpkg install
, vzpkg update
, or vzpkg create cache
commands since the packages are available locally and there is no need to check for them in the corresponding remote repositories.
This command is used to remove the software packages, their headers, and metadata downloaded to the server from the repository during the vzpkg
execution (e.g., while caching an OS EZ template or adding an application EZ template to a container for the first time).
vzpkg clean [<options>] [<OS_template> [...]]
Name | Description |
---|---|
|
Removes the packages, headers, and metadata of the specified EZ OS template from the local |
|
Checks the template area for the specified EZ OS template (the template area has the default path of |
|
Removes both:
|
|
Forces the |
|
Simulates the same operations as |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
This command is used to update the OS EZ template local metadata on the server.
vzpkg update metadata [<options>] [<OS_template> [...]]
Name | Description |
---|---|
|
Makes the |
|
If the elapsed time from the last |
|
Sets the debugging level to one of the specified values (from 0 to 10). 10 is the highest debug level and 0 sets the debug level to its minimal value. |
|
Disables logging to the screen and to the log file. |
When executed without any options, the command updates the metadata of all OS EZ templates installed on the server. If you specify one or more OS EZ templates, the command will update the metadata of the indicated OS templates only. You can run this command a cron job at regular intervals to be sure that your OS EZ templates metadata are always up-to-date.
Utility to compact containers by removing unused blocks from their virtual disks. By compacting virtual disks, you can increase free disk space on the physical server.
pcompact [-v] [-n] [-s] [-t <timeout>[s|m|h]
Name | Description |
---|---|
|
Increase the command output verbosity. Multiple |
|
Display the actions the command will execute but do not actually compact the disks. |
|
Stop the command execution after compacting the first virtual disk. |
|
Terminate the command after the specified timeout, in seconds (default), minutes or hours. |
Memory and IOPS deduplication management utility that enables/disables caching for container directories and files, verifies cache integrity, checks containers for cache errors, and purges the cache if needed.
Note
|
Note: The utility does not support additional disks attached to container. |
pfcache <command> {<file>|<dir> [<options>]
Name | Description |
---|---|
|
Enables caching of the specified files, directories or subdirectories in containers. |
|
Disables caching of the specified files, directories or subdirectories in containers. |
|
Frees up space in the memory and IOPS deduplication cache image. |
|
Verifies the integrity of the specified mounted memory and IOPS deduplication cache and deletes corrupted files. |
|
Checks for and fixes memory and IOPS deduplication cache errors in the specified container root directory. |
|
Displays inodes summary for a running container. |
|
In addition to the summary provided by stat, shows detailed information on PFCache inodes of a running container. If no options are specified, outputs full information on checksummed peer inodes. |
Checks for and fixes memory and IOPS deduplication cache errors in the specified container root directory.
pfcache check <dir> [--dry-run]
Name | Description |
---|---|
|
Container root directory. |
|
Report errors but do not make changes to the file system. |
In addition to the summary provided by stat, shows detailed information on PFCache inodes of a running container. If no options are specified, outputs full information on checksummed peer inodes.
pfcache dump <dir> [--csummed{brvbar} -a, --all {brvbar} <csum>] [--column <col> [...]]
Name | Description |
---|---|
|
Container root directory. |
|
Outputs information on checksummed inodes. |
|
Outputs information on all inodes. |
|
Outputs information on inodes with the specified checksum. |
|
Displays only the chosen column(s).
|
Enables or disables caching of the specified files, directories or subdirectories in containers.
pfcache mark <file> pfcache mark <dir> [<subdir> [...]] [--recursive] pfcache unmark <file> pfcache unmark <dir> [<subdir> [...]] [--recursive]
Name | Description |
---|---|
|
File to enable/disable caching of. |
|
Directory to enable/disable caching of. |
|
Subdirectory to enable/disable caching of. |
|
Process directory’s or subdirectory’s current contents. |
Frees up space in the memory and IOPS deduplication cache image. If no options are specified, purges entire cache.
pfcache purge <cache_dir> [--unused | --size <size> | --expire <date>]
Name | Description |
---|---|
|
Memory and IOPS deduplication cache image location. |
|
Remove only files unused at the moment. |
|
Attempt to free |
|
Remove files accessed before the specified date. A date can be specified in the ISO 8601 format or in the format defined in your system locale, with optional hours, minutes, and seconds. Examples:
|
Displays a summary of all files in the specified filesystem which have been accessed recently or are being accessed now.
pfcache stat <dir>
Name | Description |
---|---|
|
Container root directory. |
Name | Description | ||
---|---|---|---|
|
The number of checksummed files and their percentage in the total number of files fetched by the command.
|
||
|
The number of files which have been accessed recently or are being accessed now. |
||
|
The size of the files, in kilobytes. |
||
|
Memory used by the files, in kilobytes. |
||
|
The number of files fetched by the command. |
||
|
The number of files only in container’s private area. |
||
|
The number of files which have copies in the PFCache area and their percentage in fetched. |
The prl_disk_tool
utility is used to manage virtual hard disk drives.
Removes all empty blocks from the expanding virtual disk to reduce its size on the physical hard disk. The virtual disk must be formatted to NTFS, ext2/ext3/ext4, btrfs, or xfs.
prl_disk_tool compact --hdd <disk_path> [--force] prl_disk_tool compact -i, --info --hdd <disk_path>
Name | Description |
---|---|
|
Full path to the virtual disk. |
|
Forces the compacting operation for suspended virtual disks. |
|
Do not compact the virtual disk; just display the information about the size the disk will have after compacting. |
Merges all snapshots of the virtual hard disk.
prl_disk_tool merge --hdd <disk_path>
Name | Description |
---|---|
|
Full path to the virtual disk. |
Changes the capacity of the specified virtual disk. During resizing, all data present on the disk volumes are left intact. You can also resize the last partition using the --resize_partition
option. The supported file systems are NTFS, ext2/ext3/ext4, btrfs, or xfs.
prl_disk_tool resize --size <size>[K|M|G|T] [--resize_partition] --hdd <disk_path> [--force] prl_disk_tool resize -i, --info --hdd <disk_path>
Name | Description | ||
---|---|---|---|
|
New size of the virtual disk. It can be set either in kilobytes ( |
||
|
Resizes the last partition of the specified virtual disk.
|
||
|
Full path to the virtual disk. |
||
|
Forces the resizing operation for suspended virtual disks. |
||
|
Do not resize the virtual disk; just show the size the disk will have after resizing. |
This utility prints the ID of the container where the process is running.
vzpid <pid> [...]
Multiple process IDs can be specified as arguments.
These two utilities can be run on the server just as the standard Linux ps
and htop
utilities. For information on the ps
and htop
utilities, consult their man pages. The vzps
and vztop
utilities provide certain additional functionality related to monitoring separate containers running on the server.
The vzps
utility has the following functionality added: the -E <CT_name>
command-line switch can be used to show only the processes running inside the container with the specified ID.
The vztop
utility has the CTID column added to display the container UUID where a particular process is running (0
stands for the server itself).
This utility is used to generate a sample container configuration file with a set of system resource control parameters.
vzsplit [-n <num>] [-f <sample_name>] [-s <swap_size>]
This utility is used for dividing the server into equal parts. It generates a full set of containers system resource control parameters based on the total physical memory of the server it runs on and the number of containers the server shall be able to run even if the given number of containers consume all allowed resources.
Without any option the utility prompts for the desired number of containers and outputs the resulting resource control parameters to the screen.
Name | Description |
---|---|
|
Desired number of containers to be simultaneously run on the server. |
|
Name of the sample configuration to create. |
|
Size of the swap file on the server. It is recommended to specify the swap size to be taken into account when the utility generates sample configurations. |
The resulting sample configuration will be created in the /etc/vz/conf
directory. The file name will be ve-<sample_name>.conf-sample
. Now you can pass <sample_name>
as an argument to the --config
option of the prlctl create
command. If a sample with this name already exists, the utility will output an error message and will not overwrite the existing configuration.
Virtuozzo virtual machines can be managed using the prlctl
command-line utility. The utility is installed on the hardware node during the product installation.
The prlctl
utility is used to perform administration tasks on virtual machines. The utility supports a full range of tasks from creating and administering virtual machines to getting statistics and generating problem reports.
prlctl <command> <VM_name> [<options>] [-v, --verbose <number>] [--timeout <sec>] [-l, --login [<user>[:_<passwd>_]@]<server>] [-p, --read-passwd <file>]]
Name | Description |
---|---|
|
The name of the command to execute. |
|
The name of the virtual machine to perform the operation on. To obtain the list of the available virtual machines, use the |
|
Command options. See individual commands for available options. |
|
Enables verbose output. The greater the |
|
Connect to a remote |
|
Use the password from the file |
To display help, enter prlctl
without any options.
Creates an exact copy of the specified virtual machine.
prlctl clone <VM_name> --name <new_name> [--template] [--dst=<path>] [--changesid] [--detach-external-hdd <yes|no>]
Name | Description | ||
---|---|---|---|
|
Name of the virtual machine to clone. |
||
|
Name to be assigned to the new virtual machine. |
||
|
Create a virtual machine template instead of a real virtual machine. Templates are used as a basis for creating new virtual machines. |
||
|
Full path to the directory where the new virtual machine will be stored. If this option is omitted, the new virtual machine will be created in the default directory. |
||
|
Generate a new Windows security identifier (SID) for a Windows-based virtual machine. For this parameter to work, Virtuozzo tools must be installed in the virtual machine. |
||
|
If set to
|
Creates a new virtual machine. A virtual machine can be created from scratch or from a virtual machine template. When created from scratch, the target operating system type or version must be specified. To create a virtual machine from a template, the template name must be passed to the command.
prlctl create <VM_name> [<options>]
Name | Description |
---|---|
|
User-defined new virtual machine name. If the name consists of two or more words separated by spaces, it must be enclosed in quotes. |
|
The operating system distribution the virtual machine will be optimized for. For the full list of supported distributions, refer to the |
|
The name of the virtual machine template from which to create the new virtual machine. Use the |
|
User-defined new VM home path. If this parameter is omitted, the VM will be placed in the default virtual machine directory. |
|
A custom UUID to assign to the virtual machine. |
Note
|
Note: You can use either |
When creating a virtual machine from scratch, you may specify the operating system family or version. If an operating system version is specified using the --distribution
parameter, the virtual machine will be configured for that operating system. If an operating system family is specified using the --ostype
parameter, the virtual machine will be configured for the default version of this OS family. The default versions are determined internally by Virtuozzo. The best way to find out the default versions used in your Virtuozzo installation is by creating a sample virtual machine.
Deletes a virtual machine from the hardware node. The command removes a virtual machine from the Virtuozzo registry and permanently deletes all its files from the server. Once completed, this operation cannot be reversed.
prlctl delete <VM_name>
Name | Description |
---|---|
|
The name of the virtual machine to delete. |
Creates a command prompt channel to a virtual machine. By using this command, you can create a command prompt channel and execute commands in a virtual machine. Virtuozzo tools must be installed in a virtual machine to use this utility.
prlctl enter <VM_name>
Name | Description |
---|---|
|
The name of the virtual machine. |
Executes a command inside a virtual machine. Virtuozzo tools must be installed in a virtual machine to use this utility. By default, running prlctl exec <command>
is equivalent to executing bash -c <command>
in a Linux VM or cmd /c <command>
in a Windows VM.
prlctl exec <VM_name> [--without-shell] <command>
Name | Description |
---|---|
|
The name of the virtual machine. |
|
A command to execute. |
|
Run commands directly without |
Displays a list of virtual machines on the Hardware Node. Displays information on virtual machines on the Hardware Node.
prlctl list --vmtype vm [-a, --all] [-o, --output <field>[,...]] [-s, --sort {<field>|-<field>}] [-t, --template] [-j, --json] prlctl list -i, --info --vmtype vm [<VM_name>] [-f, --full] [-t, --template] [-j, --json]
Name | Description |
---|---|
|
List all running, stopped, suspended, and paused virtual machines. If this and the rest of the parameters are omitted, only the running virtual machines will be displayed. |
|
List available virtual machine templates instead of actual virtual machines. |
|
Display only the specified fields. Type field names in lower case. Separate multiple fields with commas. For the list of fields, see [_prlctl_list_output_parameters]. |
|
Sort virtual machines by the specified field in either ascending or descending order. |
|
Display detailed information about the specified virtual machine. |
|
Display detailed information about network cards in virtual machines. Used with the |
|
The name of the virtual machine for which to display the detailed information. If not specified, the information will be displayed for all registered virtual machines. |
|
Produce machine-readable output in the JSON format. |
Listed below are the parameters that can be specified after the -o
switch.
Name | Output Column | Description |
---|---|---|
|
|
Virtual machine UUID. |
|
|
Virtual machine hostname. |
|
|
Virtual machine name. |
|
|
Virtual machine description. |
|
|
Specifies the name of the OS template the virtual machine is based on (e.g., |
|
|
Virtual machine IP address. |
|
|
Virtual machine status (e.g., running or stopped). |
|
|
The number of processes and threads allowed. |
|
|
Network device’s MAC address. |
|
|
Network devices in the virtual machine . |
|
|
The bandwidth the virtual machine is allowed to use for its disk input and output (I/O) operations, in bytes per second. |
|
|
Indicates whether the virtual machine is joined to the High Availability Cluster. |
|
|
Virtual machine priority in the High Availability Cluster (0 is the lowest). Higher-priority virtual environments are restarted first in case of failures. |
Migrates a virtual machine from one host to another.
prlctl migrate <VM_name> <destination_server>[/<VM_name>] [--dst=<path>] [--keep-src] [--switch-template] [--changesid] [--ssh <options>]
Name | Description | ||
---|---|---|---|
|
The source virtual machine name. |
||
|
The source server information. Use the following format to specify this info: |
||
|
The destination server information. If omitted, the migration will be performed locally. Use the following format to specify this info: |
||
|
Name and path of the directory on the destination server where the virtual machine files should be stored. |
||
|
If this option is included, the original virtual machine will be left intact on the source server. If this option is omitted, the original virtual machine will be removed from the source server. |
||
|
Converts the virtual machine to a template and a template to a virtual machine. For example, if the source virtual machine was a template, it becomes a full featured virtual machine after the migration, and vice versa. |
||
|
Changes the resulting virtual machine SID. |
||
|
Additional options to pass to
|
Mounts or unmounts the hard disks of a virtual machine to the /vz/root/<UUID>
directory on the hardware node.
prlctl mount <VM_name> [-o <ro|rw> | --info] prlctl umount <VM_name>
Name | Description |
---|---|
|
Virtual machine name. |
|
Sets access rights:
|
|
Show information about the mounted virtual disks. |
Moves the files of a virtual machine to a new location on the same server. The virtual machine must be stopped or suspended.
prlctl move <VM_name> --dst=<path>
Name | Description |
---|---|
|
Virtual machine name. |
|
Path to the new virtual machine files location. |
Pause, suspend, and resume a virtual machine.
prlctl pause <VM_name> prlctl suspend <VM_name> prlctl resume <VM_name>
Name | Description |
---|---|
|
The name of the virtual machine to pause, suspend, or resume. |
The pause command pauses a virtual machine. To continue the virtual machine operation, use the prlctl start command.
The suspend command suspends the virtual machine operation. When a running virtual machine is suspended, the state of the virtual machine processes is saved to a file on the host. After that, the machine is stopped. To resume the machine, use the resume command.
Obtains a problem report for the specified virtual machine and either sends it to the Virtuozzo technical support team or displays it on the screen.
prlctl problem-report <VM_name> <-d, --dump|-s, --send [--proxy [<user> \ [:<passwd>]@<proxyhost>[:<port>]]] [--no-proxy]>
Name | Description |
---|---|
|
The name of the virtual machine for which to obtain the problem report. If the name consists of separate words, it must be enclosed in quotes. |
|
Collect technical data about a virtual machine and display it on the screen. You can also pipe the output to a file and then send it to the Virtuozzo technical support team to analyze your problem. |
|
Send the generated problem report to the Virtuozzo technical support team. |
|
Use the specified information to send the generated report through a proxy server, if you use one to connect to the Internet. |
|
Do not use a proxy server to send the generated report. This is the default behavior, so you can omit this parameter. |
The register
command is used to register a virtual machine with Virtuozzo.
The unregister
command removes a virtual machine from the Virtuozzo registry.
prlctl register <path> --preserve-uuid <yes|no> prlctl unregister <VM_name>
Name | Description |
---|---|
|
An absolute path to the virtual machine directory. |
|
The name of the virtual machine to remove from the Virtuozzo registry. |
|
Specifies what to do with the UUID (universally unique identifier). If you specify |
Use the register
command when you have a virtual machine on the server that does not show up in the list of the virtual machines registered with the Virtuozzo. This can be a machine that was previously removed from the registry or a machine that was copied from another location.
The unregister
command removes a virtual machine from the Virtuozzo registry, but does not delete the virtual machine files from the server. You can re-register such a machine with Virtuozzo later using the register
command.
Resets a virtual machine uptime counter as well as count start date and time.
prlctl reset-uptime <VM_name>
Name | Description |
---|---|
|
Virtual machine name. Names consisting of multiple words must be enclosed in quotes. |
The prlctl set
command is used to modify the configuration of a virtual machine and manage virtual machine devices. The following subsections provide technical information on how to use the command to perform these tasks.
The prlctl set
command is used to modify the virtual machine configuration parameters.
prlctl set <VM_name> [--cpus <number>] [--memsize <number>] [--videosize <number>] [--memguarantee <percentage>] [--mem-hotplug <on|off>] [--distribution _<name>] [--description <desc>] [--autostart <on|off|auto>] [--autostart-delay <number>] [--autostop <stop|suspend>] [--applyconfig <conf>] [--name <new_name>] [--start-as-user <administrator|owner|<user>:_<passwd>_] [--vnc-mode <auto|manual|off> {--vnc-passwd <passwd> | --vnc-nopasswd}] [--vnc-port <port>] [--vnc-address <address>] [--cpu-hotplug <on|off>] [--cpuunits <units>] [--cpulimit {<percent>|<megahertz>}] [--ioprio <priority>] [--iolimit <limit>] [--iopslimit <limit>] [--cpumask {<N>[,N,N1-N2] | all}] [--offline-management <on|off>] [--offline-service <service_name>] [--userpasswd <user>:<passwd> [--crypted]] [--rate <rate>] [--ratebound <on|off>_] [--apply-iponly <yes|no>] [--efi-boot <on|off>] [--tools-autoupdate <on|off>]
Name | Description | ||
---|---|---|---|
|
Target virtual machine name. |
||
|
Number of virtual CPUs in the virtual machine. If the server has several CPU cores, this option also defines the number of CPUs shown to users from inside a virtual machine. |
||
|
The amount of memory (RAM) available to the virtual machine, in megabytes. You can use the following suffixes to specify measurement units:
|
||
|
The amount of video memory available to the virtual machine graphics card. You can use the following suffixes to specify measurement units:
|
||
|
Sets a percentage of virtual machine’s RAM that said VM is guaranteed to have. By default, set to 40%. |
||
|
Enables or disables memory (RAM) hotplug support in the virtual machine. This feature is disabled in the virtual machine by default. The guest operating system must support memory hotplug for this functionality to work. |
||
|
Optimize the virtual machine for use with the operating system |
||
|
Sets virtual machine description. Descriptions with white spaces must be enclosed in quotation marks. |
||
|
Defines the virtual machine start-up options:
If you set this option to |
||
|
Sets the time delay used during the virtual machine automatic startup. |
||
|
Sets the automatic shutdown mode for the specified virtual machine:
|
||
|
Applies the resource parameter values from the specified VM sample file in
|
||
|
Changes the virtual machine name. You can only change the names of stopped virtual machines. |
||
|
Specifies the account to use to autostart the virtual machine:
|
||
|
Enables or disables access to the virtual machine via the VNC protocol. |
||
|
Sets the VNC port number. |
||
|
Sets the VNC password or specifies that no password is needed for VNC connections. Either of these options is mandatory for any VNC connection. |
||
|
Sets the IP address to use for logging in to the virtual machine via VNC. It must be one of the IP addresses assigned to the hardware node. By default, you can use any of the IP addresses of the hardware node to log in to the virtual machine. |
||
|
Enables or disables CPU hotplug support in the virtual machine. This feature is disabled by default. The guest operating system must support CPU hotplug for this functionality to work. |
||
|
Sets the CPU weight for the virtual machine. This is a positive integer number that defines how much CPU time the virtual machine can get as compared to the other virtual machines and containers running on the server. The larger the number, the more CPU time the virtual machine can receive. Possible values range from 8 to 500000. If this parameter is not set, the default value of 1000 is used. |
||
|
CPU limit, in percent or megahertz (MHz) the virtual machine is not allowed to exceed. By default, the limit is set in percent. To set the limit in MHz, specify "m" after the value.
|
||
|
Disk I/O priority level from 0 to 7. The default is 4. |
||
|
Disk I/O bandwidth limit. The default is 0 (no limit). By default the limit is set in megabytes per second. You can use the following letters following the number to specify units of measure:
The default I/O bandwidth limit for all newly created virtual machines is set to 0, which means that no limits are applied to them. |
||
|
Maximum number of disk input and output operations per second a virtual machine is allowed to perform. By default, any newly created container does not have the IOPS limit set and can perform so many disk I/O operations per second as necessary. |
||
|
An affinity mask indicating what CPU(s) the virtual machine processes should be run on. You can specify a list of CPUs identified by their index numbers separated by commas (0, 1, 2, 3, etc.) or a range (4-6). To make all CPUs available for the virtual machine processes specify |
||
|
Turns the offline management on or off. |
||
|
The name of the service to use for offline management. |
||
|
Sets the password for the specified user in the virtual machine. If the user account does not exist, it will be created. Virtuozzo tools must be installed in the virtual machine for the command to work. |
||
|
Used with |
||
|
Sets the guaranteed outgoing traffic rate in Kbps for the virtual machine. |
||
|
Turns the network traffic rate limitation set by the |
||
|
If set to |
||
|
If set to |
||
|
Enables or disables automatic update of Virtuozzo tools inside Windows virtual machines. If set to |
The prlctl set
command allows to add, modify, and delete virtual devices of virtual machines.
prlctl set <VM_name> --device-add <dev_type> <options> prlctl set <VM_name> --device-set <dev_name> <options> prlctl set <VM_name> --device-del <dev_name> <options> --destroy-image-force prlctl set <VM_name> --device-connect <dev_name> prlctl set <VM_name> --device-disconnect <dev_name> prlctl set <VM_name> --device-bootorder "dev_name1 dev_name2 [...]"
Name | Description |
---|---|
|
Virtual machine name. |
|
Adds a virtual device of the type <dev_type> to a virtual machine. The |
|
Modifies the configuration of the virtual device <dev_name> in a stopped virtual machine. |
|
Deletes the virtual device <dev_name> from a stopped virtual machine. |
|
Used with the |
|
Connects the virtual device <dev_name> to a running virtual machine. |
|
Disconnects the virtual device <dev_name> from a running virtual machine. |
|
Specifies the boot order for a virtual machine. |
Note
|
Note: Device names can be obtained with the |
The device-related <options>
can be subdivided into the following categories:
-
hard disk drives
-
optical disk drives
-
network cards
-
floppy disk drives
-
serial ports
-
USB devices
Each group of options is explained in the following subsections in detail.
Hard Disk Drive Management Options
This group of options is used to add and configure virtual hard disks in a virtual machine. The first syntax uses a file to emulate a hard disk drive. The second syntax connects a physical hard disk on the host server to the virtual machine.
prlctl set +<VM_name> {--device-add hdd | --device-set hdd<N>} [--image <file>] [--type <expanded|plain>] [--size <size>] [--split] [--iface <ide|scsi|virtio>] [--position <pos>] [--enable|--disable] prlctl set <VM_name> --device-add hdd --device <dev_name> [--position <pos>] [--iface <ide|scsi|virtio>] prlctl set <VM_name> --backup-add <backup_ID> [--disk <disk_name>] [--iface <ide|scsi|virtio>] [--position <pos>] prlctl set <VM_name> --backup-del {<backup_ID>|all}
Name | Description |
---|---|
|
Virtual machine name. |
|
Adds a virtual hard disk to the VM. New hard disks are created in the virtual machine directory and are automatically named |
|
Modifies the parameters of an existing virtual hard disk. Virtual hard disks are named using the |
|
Specifies an image file that will be used to emulate the virtual disk.
|
|
This option is used to connect a physical hard disk on the hardware node to the virtual machine. You can obtain the names of the existing hard disks on the server using the |
|
The size of the virtual hard disk, in megabytes. The default size is 65536 MB. |
|
Splits the hard disk image file into 2 GB pieces. You should split a virtual disk if it is stored on a file system that cannot support files larger than 2 GB (e.g., FAT16). |
|
Enables the specified virtual disk drive. All newly added disk drives are enabled by default (provided the |
|
Disables the specified virtual disk drive. The disk drive itself is not removed from the virtual machine configuration. |
|
Attach the backup with the identifier <backup_ID> to the virtual machine as a virtual hard disk. To obtain the backup ID, use the |
|
Used with |
+--backup-del {<backup_ID>¦all} |
Detach either the backup with the identifier <backup_ID> or detach all backups from the virtual machine. |
|
The disk drive Interface type. If omitted, the SCSI interface will be used. |
|
The SCSI or IDE device identifier to be used for the virtual disk. |
Optical Disk Drive Management Options
This group of options is used to add and configure virtual optical disk drives, such as DVD or CD drives.
prlctl set <VM_name> {--device-add cdrom | --device-set cdrom<N>} {--device <dev_name> | --image <file>} [--iface <ide|scsi>] [--position <pos>] [--enable|--disable] [--connect|--disconnect]
Name | Description |
---|---|
|
Virtual machine name. |
|
Adds a DVD/CD drive to the virtual machine. |
|
Modifies the parameters of an existing virtual optical disk. The |
|
The name of the physical optical disk to connect to the virtual machine. |
|
The name of an existing disk image file to mount in the virtual machine. Currently, the following image file formats are supported: |
|
Interface type:
|
|
The SCSI or IDE device identifier to be used for the DVD/CD drive. You can use one of the following formats for specifying IDs: |
|
Enables the specified DVD/CD drive. All newly added drives are enabled by default (provided the |
|
Disables the specified optical disk drive. The disk drive itself is not removed from the virtual machine configuration. |
|
Automatically connect the specified optical disk drive during the virtual machine startup process. |
|
Do not automatically connect the specified optical disk drive during the virtual machine startup process. |
Network Adapter Management Options
This group of options is used to manage virtual network adapters in a virtual machine.
prlctl set <VM_name> {--device-add net | --device-set net<N>} {--type routed | --network <network_ID>} [--mac {<addr>|auto}] [{--ipadd <addr>[/<mask>] | --ipdel <addr>[/<mask>] | --dhcp <yes|no> | --dhcp6 <yes|no>}] [--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>] [--configure <yes|no>] [--ipfilter <yes|no>] [--macfilter <yes|no>] [--preventpromisc <yes|no>] [--enable|--disable] [--connect|--disconnect] [--adapter-type <e1000|rtl|virtio>]
Name | Description | ||
---|---|---|---|
|
Virtual machine name. |
||
|
Adds a new virtual network adapter to the virtual machine. |
||
|
Modifies an existing virtual network adapter. To obtain the list of the available adapters, use the |
||
|
Sets the networking mode for the virtual network adapter to "routed". In this mode, the network adapter is communicating with the outside world through an internal virtual network adapter. |
||
|
Sets the networking mode for the virtual network adapter to "virtual_network". In this mode the adapter is connected to a virtual network specified by |
||
|
Specifies the MAC address to assign to an existing network adapter. Specify a desired MAC address using the |
||
|
Adds an IP address and a mask (optional) to the network adapter. |
||
|
Deletes an IP address from the network adapter. |
||
|
Specifies whether the virtual network adapter should obtain the IPv4 settings through a DHCP server. |
||
|
Specifies whether the virtual network adapter should obtain the IPv6 settings through a DHCP server . |
||
|
The default gateway to be used by the virtual machine. |
||
|
The default IPv6 gateway to be used by the virtual machine. |
||
|
The default DNS server address to be used by the virtual machine. |
||
|
The default search domain to be used by the virtual machine. |
||
|
If set to |
||
|
Determines if the specified network adapter is configured to filter network packages by IP address. If set to |
||
|
Determines if the specified network adapter is configured to filter network packages by MAC address. If set to |
||
|
Determines if the specified network adapter should reject packages not addressed to its virtual machine. If set to |
||
|
Enables or disable the network adapter. If omitted during the adapter creation, the adapter will be enabled. |
||
|
Connects or disconnects the network adapter. When disconnected, the adapter is not removed from the virtual machine. |
||
|
Emulated network adapter:
|
Floppy Disk Drive Management Options
This group of options is used to add a floppy disk drive to a virtual machine and to modify the existing virtual floppy disk drive.
prlctl set <VM_name> {--device-add fdd | --device-set fdd0} {--device <dev_name> | --image <file>} [--enable|--disable] [--connect|--disconnect]
Name | Description |
---|---|
|
Virtual machine name. |
|
Adds a new floppy disk drive to the virtual machine. |
|
Modifies the parameters of the existing virtual floppy disk drive. |
|
The name of the physical floppy disk drive to connect to the virtual machine. If this parameter is omitted, a floppy drive image emulating the floppy disk drive will be created. |
|
The name and path of an existing floppy disk image file (usually |
|
Enables the specified floppy disk drive. All newly added floppy drives are enabled by default (provided the |
|
Disables the specified floppy disk drive. The drive itself is not removed from the virtual machine configuration. |
|
Connect the specified floppy disk drive automatically during the virtual machine startup process. |
|
Use this option if you don’t want the specified floppy disk drive automatically connected to the virtual machine on its start. |
Serial Port Management Options
This group of options is used to manage serial ports in a virtual machine.
prlctl set <VM_name> {--device-add serial | --device-add serial<N>} {--device <dev_name> | --output <file> | --socket <name>} [--enable|--disable] [--connect|--disconnect]
Name | Description |
---|---|
|
Virtual machine name. |
|
Adds a new serial port to the virtual machine. |
|
Modifies the parameters of an existing serial port. |
|
The name of the physical serial port to which to connect the virtual machine. |
|
The name and path of the output file to which to connect the virtual serial port. |
|
The name of the physical socket to which to connect the virtual serial port. |
|
Enables or disables the virtual serial port. All newly added serial ports are enabled by default (provided the |
|
Automatically connect the virtual serial port during the virtual machine startup process. |
|
Do not automatically connect the virtual serial port during the virtual machine startup process. |
USB Controller Management Options
This group of options is used to manage the USB controller in a virtual machine.
prlctl set <VM_name> --device-add usb [--enable|--disable]
Name | Description |
---|---|
|
Virtual machine name. |
|
The type of the virtual device to add to the virtual machine (in this instance, a USB device). |
|
Enables or disables the USB controller. The controller is enabled by default (provided the |
Removing Devices from Virtual Machines
The --device-del
option is used to remove virtual devices from a virtual machine.
prlctl set <VM_name> --device-del <dev_name> [--detach-only|--destroy-image]
Name | Description |
---|---|
|
The name of the virtual device to delete from the virtual machine. To obtain the list of virtual devices, use the |
|
Deletes the information about the specified device from the virtual machine configuration. |
|
Deletes the information about the specified device from the virtual machine configuration and removes the device from the server. |
Takes, displays, reverts to, and deletes snapshots of a running virtual machine.
prlctl snapshot <VM_name> [-n, --name <name>] [-d, --description <desc>] prlctl snapshot-list <VM_name> [-t, --tree] [-i, --id <snapshot_ID>] prlctl snapshot-switch <VM_name> -i, --id <snapshot_ID> prlctl snapshot-delete <VM_name> -i, --id <snapshot_ID>
Name | Description |
---|---|
|
Virtual machine name. |
|
User-defined snapshot name. Names with white spaces must be enclosed in quotation marks. |
|
User-defined snapshot description. Descriptions with white spaces must be enclosed in quotation marks. |
|
Displays the snapshot list as a tree. The default display format is tabular with Parent Snapshot ID and Snapshot ID as columns. |
|
|
Note
|
Note: If the snapshot you want to delete has child snapshots derived from it, they will not be deleted. |
Start, stop, reset, and check the status of a virtual machine.
prlctl start <VM_name> prlctl stop <VM_name> [--kill] prlctl restart <VM_name> prlctl reset <VM_name> prlctl status <VM_name>
Name | Description |
---|---|
|
The name of the virtual machine to start, stop, restart, reset, or check the status of. |
|
Perform a hard virtual machine shutdown. If this option is omitted, an attempt to perform a graceful shutdown will be made. |
The stop
command can perform a hard or a graceful virtual machine shutdown. If the --kill
parameter is included, the hard shutdown will be performed. If the parameter is omitted, the outcome of the graceful shutdown attempt will depend on the following:
-
If Virtuozzo tools are installed in a virtual machine, the graceful shutdown will be performed using its facilities.
-
If Virtuozzo tools are not installed, the command will try to perform a graceful shutdown using ACPI. Depending on the ACPI support availability in the guest operating system, this may work or not.
The restart
command first gracefully shuts down a virtual machine and then starts it again.
The reset
command resets a virtual machine without shutting it down.
Note
|
Note: Resetting a VM may result in loss of unsaved data stored in that VM. |
The start
command can be used to start a stopped virtual machine or to resume a paused virtual machine).
This section describes the utilities you can use for creating and managing virtual machine backups.
Creates, lists, deletes or restores virtual machine backups.
prlctl backup <VM_name> [-f, --full] [-i, --incremental] [--description <desc>] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]] [--no-compression] prlctl backup-list [<VM_name>] [-f, --full] [--localvms] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]] prlctl backup-delete {<VM_name> | -t, --tag <backup_ID>} prlctl restore {<VM_name> | -t, --tag <backup_ID>} [-n, --name <new_name>] [--dst=<path>] [-s, --storage [<user>[:<passwd>]@]<server>[:<port>]]
Name | Description |
---|---|
|
Virtual machine name.
|
|
Specifies a remote backup server address, port, and credentials. If this option is omitted, the backup will be saved on the default backup server that can be configured using the |
|
Backup description. Descriptions with white spaces must be enclosed in quotation marks. |
|
|
|
Create an incremental backup of the virtual machine. An incremental backup contains only the files changed since the previous full or incremental backup. This is the default backup type. |
|
List local backups only. |
|
The ID of the backup to restore or delete. |
|
A new name to assign to the restored virtual machine. If omitted, the virtual machine will be restored with the original name. |
|
Restore the virtual machine to the specified directory on the hardware node. If this option is omitted, the virtual machine will be restored to |
|
Does not compress a backup image during its creation. |
The prl_disk_tool
utility is used to manage virtual hard disk drives.
prl_disk_tool <command> [<options>] --hdd <disk_path> [<options>] prl_disk_tool --help
Removes all empty blocks from the expanding virtual disk to reduce its size on the physical hard disk. The virtual disk must be formatted to NTFS, ext2/ext3/ext4, btrfs, or xfs.
prl_disk_tool compact --hdd <disk_path> [--force] prl_disk_tool compact -i, --info --hdd <disk_path>
Name | Description |
---|---|
|
Full path to the virtual disk. |
|
Forces the compacting operation for suspended virtual disks. |
|
Do not compact the virtual disk; just display the information about the size the disk will have after compacting. |
Merges all snapshots of the virtual hard disk.
prl_disk_tool merge --hdd <disk_path>
Name | Description |
---|---|
|
Full path to the virtual disk. |
Changes the capacity of the specified virtual disk. During resizing, all data present on the disk volumes are left intact. You can also resize the last partition using the --resize_partition option. The supported file systems are NTFS, ext2/ext3/ext4, btrfs, or xfs.
prl_disk_tool resize --size <size>[K|M|G|T] [--resize_partition] --hdd <disk_path> [--force] prl_disk_tool resize -i, --info [--units <K|M|G|T>] --hdd <disk_path>
Name | Description | ||
---|---|---|---|
|
New size of the virtual disk. It can be set in kilobytes (specify |
||
|
Resizes the last partition of the specified virtual disk.
|
||
|
Full path to the virtual disk. |
||
|
Forces the resizing operation for suspended virtual disks. |
||
|
Do not resize the virtual disk; just show the size the disk will have after resizing. |
||
|
Displays the disk size in kilobytes ( |