ResolutionAlong with migrating virtual machines and containers between your Parallels servers, you may also wish to move a virtual machine to a container. The migration process includes copying the whole contents of the virtual machine (i.e. all its files, directories, quota limits, configuration settings, and so on) to a container on the Parallels server. After migrating the virtual machine, you will have its exact copy in including the operating system, the IP addresses assigned, the amount of available disk space and memory, etc.
Moving a virtual machine to container involves pmigrate utility on the Parallels server. For instance you can execute the following command to move a virtual machine with the IP address of 192.168.1.130 to container 101 on your Parallels server (NOTE: the virtual machine is to be started):
# pmigrate h root:firstname.lastname@example.org c 101
You can omit the virtual machine credentials in the command above. In this case you will be asked to provide them during the command execution.
Requirements for Migrating to Containers
To avoid delays and problems when migrating a virtual machine to a container make sure that the following requirements are fulfilled:
- The virtual machine to be migrated is running a Linux distribution (Fedora Core, Red Hat, Debian, SUSE, etc.).
NOTE: None of the BSD operating systems is supported.
- The Linux distribution installed on the virtual machine is supported by Parallels Server Bare Metal. To find out if your Linux distribution can be recognized by Parallels Server Bare Metal, you can check the /etc/vz/conf/dists directory on the Parallels server and look for the configuration file of your Linux distribution. It should have the name of Linux_Distribution_Name-version.conf where Linux_Distribution_Name and version denote the name of the Linux distribution and its version, respectively (e.g. redhat-5.conf). If there is no corresponding distribution in the directory, you can do one of the following:
* Create a new distribution configuration file and place it to the /etc/vz/conf/dists directory on the Parallels server. Detailed information on how to create new configuration files is provided in the Parallels Server 4 Bare Metal User's Guide below ("Creating Configuration Files for New Linux Distribution" section, p. 184).
* Start the migration process without having the right configuration file for your Linux distribution. In this case the unknown.conf distribution configuration file from the /etc/vz/conf/dists directory will be used for tuning the container after the virtual machine migration. However, using the unknown.conf configuration file means that you will not be able to use standard Parallels Server Bare Metal utilities (e.g. pctl) for performing the main operations on the created container (such as setting the container IP address or configuring the DNS parameters) and have to manually complete these tasks from inside the container.
- A network connection can be established among the virtual machine to be migrated and the Parallels server.
- ssh is installed on both the virtual machine and the Parallels. ssh is used to provide secure encrypted and authenticated communication. You can check if the ssh package is already installed on the machine by executing the
# ssh -V
- rsync is installed on the virtual machine. rsync is used to copy the virtual machine contents to the container. If the virtual machine rsync happens to be incompatible with the Parallels server, use the statically linked rsync from the /usr/local/share/vzlinmigrate directory on the virtual machine as well.
Migration Restrictions for Containers
Although Parallels Server Bare Metal allows you to migrate practically any virtual machine running a Linux distribution to a container, there is a number of limitations which should be taken into account before deciding on the migration process:
- During the migration, all the filesystems available on your virtual machine are joined to one filesystem inside the container - VZFS (Virtuozzo File System). Detailed information on VZFS is provided in the Virtuozzo File System subsection (Parallels Server 4 Bare Metal User's Guide p. 16).
- If there are several IP addresses assigned to the virtual machine, all these IP addresses will be reassigned to one and the same device on the Parallels server - venet0. This virtual network adapter is used to connect all the containers on the given Parallels server among themselves and with the server. After the migration, you can create additional virtual network adapters inside the container and decide what IP address to be assigned to what network adapter. For detailed information on how to create and manage container virtual network adapters, turn to Managing Adapters in containers (Parallels Server 4 Bare Metal User's Guide p. 137).
- During the migration process, you may specify only one partition on the virtual machine which will be migrated to the container together with all quotas imposed on it. All the other partitions of the virtual machine will be copied without keeping their quota limits. Moreover, the quota limits imposed on the selected partition will be applied to the entire container after the virtual machine migration.
- While migrating your virtual machine running a Linux operating system with the securityenhanced (SE) Linux kernel, keep in mind that the SE Linux kernel is currently not supported by Parallels Server Bare Metal. Therefore, the container where the virtual machine running the SE Linux distribution has been migrated will not support the SE security features.
- If any of your files and/or directories on the virtual machine have extended attributes associated with them, these attributes will be lost after the machine migration.
- Raw devices on the virtual machine cannot and will not be migrated to the container on the Parallels server.
- If you are running an application which is bound to the virtual machine MAC address, you will not be able to run this application inside the container after the server migration. In this case, you can do one of the following:
* If you are running a licensed application, you should obtain a new license and install the application inside the container anew.
* If you are running a non-licensed application, you can try to reconfigure the application and to make it work without being bound to any MAC address.
- If the migration process fails on the step of transferring files and directories from the virtual machine to the container by means of rsync, the /vz/private/CT_ID directory on the Parallels server will contain all the copied files and directories and may occupy a great amount of disk space. You can keep the directory, which will greatly speed up the repeated migration procedure, or manually remove the directory by using the rm utility.