Table of Contents

prlctl

NAME

prlctl − utility for managing R-Virtualization servers and virtual environments residing on them.

SYNOPSIS

prlctl create <ve_name> [-t,--ostemplate <name> -o,--ostype <name list> -d,--distribution <name list>] [--vmtype ct vm] [--dst <path>] [--changesid] [--no-hdd] [--uuid <uuid>] [OPTIONS]

prlctl backup <ve_id ve_name> [-f,--full] [-i,--incremental] [-s,--storage <user[[:passwd]@server[:port] [--description <desc>]>] [--no-compression] [--no-tunnel] [--no-reversed-delta]

prlctl backup-list [ve_id ve_name] [-f,--full] [--localvms] [--vmtype ct vm all] [-s,--storage <user[[:passwd]@server[:port]>]

prlctl backup-delete {<ve_id> -t,--tag <backup_id>} [--keep-chain] [-s,--storage <user[[:passwd]@server[:port]>]

prlctl restore {<ve_id> -t,--tag <backup_id>} [-s,--storage <user[[:passwd]@server[:port]>] [-n,--name <new_name>] [--dst <path>] [--no-tunnel] [--live]

prlctl capture <ve_id ve_name> [--file <path>]

prlctl clone <ve_id ve_name> --name <new_name> [--template] [--dst <path>] [--changesid] [--linked] [--detach-external-hdd <yes no>] [OPTIONS]

prlctl delete <ve_id ve_name> [--force]

prlctl installtools <ve_id ve_name>

prlctl exec <ve_id ve_name> [--without-shell] <command>

prlctl enter <ve_id ve_name>

prlctl console <ve_id ve_name>

prlctl list [-a,--all] [-L] [-o,--output field[,field…]] [-s,--sort <field -field>] [-t,--template] [--vmtype <ct vm all>] [-j,--json]

prlctl list -i,--info [-f,--full] [ve_id ve_name] [-t,--template] [--vmtype ct vm all] [-j, --json]

prlctl migrate <[src_node/]ID> <dst_node[/NAME]> [--dst <path>] [--changesid] [--clone --remove-src] [--no-compression] [--no-tunnel] [--ssh <options>]

prlctl pause <ve_id ve_name> [OPTIONS]

prlctl problem-report <ve_id ve_name> <-d,--dump -s,--send [--proxy [user[:password]@proxyhost[:port]]] [--no-proxy]> [OPTIONS]

prlctl reinstall <ve_id ve_name> [--no-backup] [--resetpwdb] [--ostemplates <name>]

prlctl register <path> [--preserve-uuid --uuid <UUID>] [--regenerate-src-uuid] [--force] [OPTIONS]

prlctl reset <ve_id ve_name> [OPTIONS]

prlctl resume <ve_id ve_name> [OPTIONS]

prlctl restart <ve_id ve_name>

prlctl reset-uptime <ve_id ve_name>

prlctl set <ve_id ve_name> [--cpus <n>] [--cpu-sockets <n>] [--memsize <n>] [--videosize <n>]

prlctl start <ve_id ve_name> [OPTIONS]

prlctl stop <ve_id ve_name> [--kill] [OPTIONS]

prlctl snapshot <ve_id name> [-n,--name <name>]

prlctl snapshot-list <ve_id name> [{-t,--tree -i,--id <snapid>}]

prlctl snapshot-delete <ve_id name>“ -i,--id <snapid> [-c,--children]

prlctl snapshot-switch <ve_id name>” -i,--id <snapid>

prlctl suspend <ve_id ve_name> [OPTIONS]

prlctl unregister <ve_id ve_name> [OPTIONS]

prlctl mount <ve_id ve_name> [{-o <ro rw> --info}]

prlctl umount <ve_id ve_name>

prlctl move <ve_id ve_name> --dst <path>

prlctl statistics {<ve_id ve_name> -a,--all} [--filter <filter>] [--loop]

DESCRIPTION

The prlctl utility is used to manage R-Virtualization servers and virtual environments (VEs) residing on them. A virtual environment can be referred to by its ID or name assigned to the VE during its creation.

OPTIONS

Flags

The following flags can be used with the majority of prlctl commands.

Managing virtual environments

Container action scripts

Action scripts can be used to perform actions on containers at various stages of container operation. The following commands can trigger action scripts: start, stop, restart, mount, and umount.

Two types of scripts are supported: global, triggered for each container on host, and per-container, triggered for specific containers. Custom action scripts can be created manually and must be assigned specific file names to be triggered.

Custom action scripts can be of two types:

  1. Global, executed for all containers on host. Such scripts must have the prefix ’vps’ (e.g., ’vps.mount’) and need to be placed in ’/etc/vz/conf/’.
  2. per-container, executed for specific containers. Such scripts must not have the prefix ’vps’ and need to be placed in ’/vz/private/<CT_UUID>/scripts/’.

All action scripts except start and stop are executed in the host context. The start and stop scripts are executed in the container context.

The environment passed to the mount and umount scripts is the standard environment of the parent (e.g., prlctl) with two additional variables: $VEID and $VE_CONFFILE. The first has the container UUID and the second has the full path to container’s configuration file. Other container configuration parameters required for the script (such as $VE_ROOT) can be obtained from the global and per-container configuration files.

Listing virtual environments

Configuring VE resource parameters

The following options can be used with the set command.

CPU parameters

Memory parameters

Boot order parameters

Video parameters

I/O priority management

Network parameters

--apply-iponly <yes no> - If set to “yes”, the hostname, nameserver, and search domain settings from the virtual environment/Container configuration file are ignored.

Container specific parameters

Changing this parameter for a running Container, requires the Container be restarted.

VNC parameters

High Availability Cluster

Optimization parameters

Miscellaneous parameters

Managing VE devices

The following options can be used to manage VE devices: --device-add, --device-set, and --device-del, --device-connect, --device-disconnect. Only one option can be specified at a time.

--device-add <hdd cdrom net fdd serial usb pci> [device_options]

Adding virtual hard disk drives to VE

--device-add hdd [--image <image_name>] [--recreate] [--size <n>] [--iface <ide scsi virtio>] [--subtype <virtio-scsi hyperv>] [--position <n>] [--mnt <path>]

Managing virtual hard disk drives encryption

--device-add hdd --encryption-keyid <key_id> [other HDD options] --device-set hdd --encrypt --encryption-keyid <key_id> [--no-wipe] --device-set hdd --decrypt [--no-wipe] --device-set hdd --encryption-keyid <key_id> [--no-wipe] [--reencrypt]

Connecting physical hard disks to VE

--device-add hdd --device <name> [--iface <ide scsi virtio>] [--position <n>]

Adding virtual CD/DVD-ROM drives to VE

--device-add cdrom --image <name> [--iface <ide scsi>] [--subtype <virtio-scsi hyperv>] [--position <n>]

Connecting physical DVD/CD-ROM drive to VE

--device-add cdrom --device <name> [--iface <ide scsi>] [--position <n>]

Adding virtual floppy disk drive to VE

--device-add fdd

Connecting physical floppy disk drive to VE

--device-add fdd --device <name>

Adding virtual network adapters

--device-add net {--type routed --network <network_id>} [--mac <addr auto>] [--ipadd <ip> --ipdel <ip> --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>] [--adapter-type <virtio hyperv e1000 rtl>]

Adding virtual serial port to VE

--device-add serial {--device <name> --output <file> --socket <file> [--socket-mode <server client>] --socket-tcp <ip:port> [--socket-mode <server client>] --socket-udp <ip:port> [--socket-mode <server client>]}

Enable USB support

--device-add <usb>

Connecting VT-d PCI devices

To detach a single backup disk, use the --device-del command.

Backup and restore management

The following command and options can be used to back up and restore a virtual environment. The --storage option allows you to specify the backup server. If this option is omitted, the local server is used.

Migration management

The following options can be used to migrate a virtual environment from the source server src to the destination server dst. If the virtual environment is running, the migration is performed as follows. First, virtual environment data is copied to the destination server, then the virtual environment is suspended, and, finally, the remaining data is migrated. After the virtual environment has been successfully migrated, it is removed from the source server.

Do not specify the hostname/IP address of the destination server as an option.

Snapshot management

Hostname management

Offline management

Network bandwidth management

Performance statistics

Storage device statistics

Network statistics

Classful network statistics

Result is provided in 5 columns:

Class Input(bytes) Input(packets) Output(bytes) Output(packets)

CPU statistics

RAM statistics

Mounted filesystems statistics

DIAGNOSTICS

prlctl returns 0 upon successful command execution. If a command fails, it returns the appropriate error code.

EXAMPLES

To create and start a VM having the name of win2003 and based on the ’Windows XP’ template:

prlctl create win2003 --ostemplate ’Windows XP’ prlctl start win2003

To stop the win2003 VE:

prlctl stop win2003 

To remove the win2003 virtual environment from the R-Virtualization server:

prlctl delete win2003 

To list all virtual environments, displaying the real IP addresses instead of the configured ones:

prlctl list -a -o uuid,status,ip,type,name -s name 

SEE ALSO

prlsrvctl(8)

Copyright © 2012-2017 R-Platforma LLC, All rights reserved. Copyright © 2017-2019 R-Platforma LLC, All rights reserved.