Migrating Xen Virtual Machines
You can use the
pmigrate
utility to migrate Xen virtual machines to virtual machines on the Parallels server. Moving a Xen virtual machine to a Parallels virtual machine involves completing the following steps:
-
Installing the Parallels agent on the physical server hosting the Xen virtual machine.
-
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 Parallels agent on the Xen server where the virtual machine is residing. To install the Parallels agent, do the following:
-
Log in to the Xen server as a user with administrative rights.
-
Copy the Parallels agent installation file to the Xen server. The installation file is located in the
/usr/share/pmigrate/tools
directory on the Parallels server and has the name
parallels-transporter-agent-parallels-en_US-
XXXX
.run
.
-
Execute the copied file, and follow the instructions to install the Parallels agent.
-
Start the Parallels agent:
# parallels-transporter-agent -c
Migrating the Xen virtual machine
Once the Parallels 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 Parallels 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 Parallels 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 Parallels server.
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 Parallels server 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 Parallels server. In this case, you can do the following:
-
Remove the copied virtual machine from the Parallels server and try to migrate the virtual machine again.
-
Configure the copied virtual machine on the Parallels server manually.
If you choose the second way, do the following:
-
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.
-
Detect where on the disk the root partition is located, and mount it.
-
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.
-
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.
-
Create the
initrd
image for the normal kernel if you have not already done so when installing the kernel.
-
Configure the bootloader to load the normal kernel if you have not already done so when installing the kernel.
-
Configure the
/etc/inittab
file to start
getty
and
tty1
-
tty6
.
-
Unmount the partitions.
-
Restart the virtual machine, and boot into the normal kernel.
|