Previous page

Next page

Locate page in Contents

Print this page

pmigrate

The pmigrate utility is used to perform different kinds of Container migration.

Syntax

pmigrate < source_server > < destination_server > [ options ]

< source_server > can be either the physical server hosting the virtual machine or Container to move or the physical computer to migrate. < destination_server > is the server where the resulting Container is to be hosted. If the source and/or destination server is not specified, the operation is performed on the local server.

< source_server > and < destination_server > consist of two parts:

  • < type > denotes the type of computer to migrate and can be one of the following:
    • h must be specified when migrating a physical server.
    • c must be specified when migrating a Container.
    • v must be specified when migrating a virtual machine.
  • < address > denotes the location of computer to migrate and can be one of the following:
    • The computer location if you are migrating a physical server.
    • The computer location and the virtual machine name or Container ID if you are migrating a virtual machine or Container, respectively. The location must be separated from the virtual machine name/Container ID by the slash ( / ).

The location format is as follows:

[ user [ : password ] @ ] <dst> [ : port ]

where <dst> is the destination server IP address or hostname.

The [ options ] you can use with pmigrate depend on whether you are migrating to a virtual machine or a Container. This section describes the parameters for migrating Containers between Parallels servers and for moving virtual machines and physical servers to Containers. For information on performing these operations for virtual machines, see pmigrate .

Container-related Options

The following options can be used with pmigrate when migrating Containers between Parallels servers:

Name

Description

-s, --nostart

Do not attempt to start the Container on the destination server after its successful migration if the Container was running on the source server prior to the migration. This option does not have any effect if the Container was not running on the source server.

-r, --remove-area <yes | no>

This option takes precedence of the REMOVEMIGRATED setting from the global configuration file. If “yes” is specified, then the Container private area and configuration file will be deleted after successful migration. If “no” is specified, the private area and configuration file will be left on the source server and have the .migrated suffix appended to them.

-f, --nodeps
[ = [ all ][ ,cpu_check ]
[ ,disk_space ]
[ ,technologies ]
[ ,license ][ ,rate ]]

During its execution, pmigrate performs a number of checks on the destination server (e.g., it verifies that all OS and application templates required for the Container are present on the destination server) and if some checks fail, exits with an error. This option allows you to bypass all checks and migrate the Container. If you specify this option for a running Container, the Container will not be automatically started on the destination server. You should manually start it after adding the missing templates.

You can additionally use one or several of the following parameters with this option:

  • all : do not perform any checks on the destination server.
  • cpu_check : do not check the CPU capabilities of the Destination Server.
  • disk_space : do not check the amount of disk space on the destination server.
  • technologies : do not check a set of technologies provided by the Parallels Cloud Server kernel on the destination server (for the description of the TECHNOLOGIES parameter, see Container Configuration File ).
  • license : do not check the license installed on the destination server.
  • rate : do not check the value of the RATE parameter in the Parallels Cloud Server global file.

-b, --batch

Normally, you do not have to specify this option. It is used by Parallels Cloud Server scripts and changes the screen output to a computer-parsable form.

--ssh= <ssh_options>

Additional options to be passed to ssh while connecting to the destination server.

Note: Do not specify the destination server hostname as an option of --ssh .

--keep-dst

Do not remove the 'synched' Container private area on the destination server if some error occurred during the migration. This option allows you to prevent pmigrate from the repeated 'synching' the Container private area if the first migration attempt failed for some reason or other.

--online

Migrates the running Container with zero downtime. By default, the 'iterative online migration' type is used. During the migration:

1. The main amount of Container memory is transferred to the destination server.

2. The Container is 'dumped' and saved to an image file.

3. The image file is transferred to the destination server where it is 'undumped'.

Using this type of online migration allows you to attain the smallest service delay.

To not use the 'iterative online migration' type, supply the --noiter option.

--noiter

Can be used only together with the --online option. Sets the migration type to 'simple'. This option cannot be used together with the --require-realtime option.

--require-realtime

Can be used only together with the --online option. Forces pmigrate to move the Container by using the 'iterative online migration' type. If this migration type cannot be carried out for some reason, the command will fail and exit. This option cannot be used together with the --noiter option.

If the default 'iterative online migration' type cannot be carried out, and this option is omitted , pmigrate will try to move your Container by using the 'simple online migration' type.

--readonly

Just copy the specified Container to the destination server without making any changes to the Container on the Source Server.

--convert-vzfs

Convert legacy Containers to the Container-in-an-image-file layout.

--dry-run

Simulate the same operations as pmigrate completes without specifying this option (connects to the destination server, verifies that all OS and application templates required for the Container are present on the server, etc.); however, the Container itself is not moved to the destination server.

--non-sharedfs

Use to migrate Containers from a shared file system to a non-shared one.

Virtual Machine-related Options

The following options can be used with pmigrate when migrating a physical server or a virtual machine to a Container:

Name

Description

-c

Mandatory. The full path to the configuration file on the Parallels server that was created on the physical server by means of the vzhwcalc utility. You can specify only the name of the configuration file if you run the vzp2v utility from the directory where this file is located.

-q, --quota

Optional. The partition on your physical server which has any per-user/group quotas imposed on it. This partition will be migrated to the Container together with all quotas imposed on it. Moreover, these quotas will be applied to the entire Container after the server migration.

-z, --eztmpl

Optional. The EZ OS template to be used to create the Container. You may list all OS templates installed on the Parallels server together with their updates by executing the vzpkg list command. If an OS template is not specified, the mkvzfs command is executed during the Container creation which makes an empty private area with the name of /vz/private/ CT_ID on the Parallels server. This private area is then used to copy all the physical server files to it.

-d, --dist

Optional. The Linux version your physical server is running. The name of the version specified should coincide with the name of the corresponding distribution configuration file located in the /etc/vz/conf/dist directory on the Parallels server. For example, if you specify rhel-5 as the value of this option, the rhel-5.conf file should be present in the /etc/vz/conf/dist directory on the Parallels server. You must obligatorily set this option, if there is no DISTRIBUTION variable specified in the server configuration file. In case the DISTRIBUTION variable is set in the configuration file and you have specified the -d option, the latter takes precedence.

--exclude

Optional. The path to the directories and files which will be excluded from copying to the Container. This option allows you to avoid migrating the data you do not need. To gain more understanding on this option, please consult the man pages for the rsync utility from where it was borrowed.

Note : We strongly recommend that you exclude the directories you were informed of while running the vzhwcalc utility on the physical server.

-S, --srvstop

Optional. The services to be stopped for the time of the physical server migration. We recommend that you stop all the services on the physical server except for the critical ones (e.g., the sshd service that is needed to provide communication between the physical server and the Parallels server) before the migration. This will prevent the running services from modifying any files being moved.