Previous page

Next page

Locate page in Contents

Print this page

Migrating Xen Virtual Machines

You can use the pmigrate utility to migrate Xen virtual machines to virtual machines on the host. Moving a Xen virtual machine to a Virtuozzo virtual machine involves completing the following steps:

  1. Installing the Virtuozzo agent on the physical server hosting the Xen virtual machine.
  2. Migrating the Xen virtual machine by running the pmigrate utility on the server.

Both steps are described below in detail.

Installing the Agent

Before you start migrating a Xen virtual machine, you need first to install the Virtuozzo agent on the Xen server where the virtual machine is residing. To install the Virtuozzo agent, do the following:

  1. Log in to the Xen server as a user with administrative rights.
  2. Copy the Virtuozzo agent installation file to the Xen server. The installation file is located in the /usr/share/pmigrate/tools directory on the Virtuozzo server and has the name parallels-transporter-agent-parallels-en_US-XXXX.run.
  3. Execute the copied file, and follow the instructions to install the Virtuozzo agent.
  4. Start the Virtuozzo agent:

    # parallels-transporter-agent -c

Migrating the Xen virtual machine

Once the Virtuozzo agent is running on the Xen server, you can migrate the Xen virtual machine. Let us assume the following:

  • You want to migrate the XenVM virtual machine from the Xen server to the MigratedVM virtual machine on the Virtuozzo server.
  • root:1qsde34rt@192.168.1.130 is the IP address and credentials of the Xen server where the MigratedVM virtual machine resides.

To migrate the XenVM virtual machine, you can run the following command:

# pmigrate x root:1qsde34rt@192.168.1.130/XenVM v MigratedVM

In this command, x denotes that you are migrating a Xen virtual machine, and v indicates that the Xen virtual machine is to be moved to a Virtuozzo virtual machine. If you omit the credentials in the command above, you will be asked to provide them during the command execution. Once the migration is complete, you can find the resulting virtual machine in the /var/parallels directory on the host.

Note: You are recommended to check the settings of the migrated virtual machine (for example, memory and network settings) and, if necessary, configure them to meet your needs.

Troubleshooting the migration of paravirtualized Xen virtual machines

When migrating a paravirtualized Xen virtual machine, pmigrate first copies the whole of the virtual machine to the host and then replaces the paravirtualized kernel of the copied machine with a normal kernel from the corresponding Linux distribution. If it cannot replace the kernel, pmigrate displays an error but does not delete the virtual machine from the host. In this case, you can do the following:

  • Remove the copied virtual machine from the host and try to migrate the virtual machine again.
  • Configure the copied virtual machine on the host manually.

If you choose the second way, do the following:

  1. Boot into the virtual machine in rescue mode using an ISO image of the Linux OS corresponding to the OS installed in the virtual machine.
  2. Detect where on the disk the root partition is located, and mount it.
  3. Detect all other partitions on the disk (/boot, /usr, and so on), and mount them to the corresponding directories on the root partition; also mount the /proc file system.
  4. Install a normal Linux kernel (for example, from the ISO image you used to boot into the virtual machine). The normal kernel must be of the same architecture as the paravirtualized Xen kernel.
  5. Create the initrd image for the normal kernel if you have not already done so when installing the kernel.
  6. Configure the bootloader to load the normal kernel if you have not already done so when installing the kernel.
  7. Configure the /etc/inittab file to start getty and tty1-tty6.
  8. Unmount the partitions.
  9. Restart the virtual machine, and boot into the normal kernel.