This guide explains how to migrate the virtual server from Citrix XenServer to OnApp Cloud.
You use this guide at your own risk. We will not be held liable for any damages caused during the migration process.
On this page:
Migration from XenServer
Prepare for .xva Export
Create a temporary Logical Volume called export001:
Format the Logical Volume ext3:
Create a directory for mount:
Mount the Logical Volume:
Export and Transfer vda File
Run xe vm-list and identify the uuid of the relevant VS.
Export the vda file:
Transfer the file over to our temporary server:
Prepare Temporary Server
Download and install cmake:
Download and install xvatool:
Convert the .xva File
Convert the xva to img:
Identify the partitions and mount them up as necessary.
Every server will most likely contain different partitions and different partition types, so…
You can identify what physical partitions the server has by running the following command:
From here you will need to mount up each partition individually until you find the / partition. Once you have found this, you will be able to cat the fstab and see the partition layout. If possible it would be easier to view this on the running XenServer VS.
Any partition that you are unable to mount as a loop device will most likely be a partition containing LVM data, so you will need to do the following to identify these:
Now you can mount up the server ready for OnApp export. In the example below, we have a fairly simple CentOS x64 installation using LVM with a raw ext3 boot partition. Here's a copy of the original fstab for your reference:
Now we have this information and can mount up the server locally:
As the /boot partition is a raw ext3 partition, we can just mount it as a loop device:
We are ignoring the swap partition here. It will be added later when the VS is imported into OnApp.
Now you can see your complete VS mounted up on my temporary server:
Import to OnApp Cloud
Before performing further actions, SSH into your temporary server (ideally you would not do this directly on the OnApp compute resource or CP as you will be installing RPMs.)
Make Changes for the OnApp Cloud Import
To prepare for the OnApp Cloud Import:
Chroot the mounted image and make the following changes:
Update fstab with the following data:
Update /boot/grub/grub.conf and alter a few things:
Make sure the location of the initrd and the kernel are correct. Make sure /dev/sda1 is set to root. Make sure console is set to tty0.
Update the following in /etc/inittab:
The first console should be configured to run on tty in all runlevels. In most cases, this line (1:2345:respawn:/sbin/mingetty tty1) should be the only line not commented out. You will most likely need to comment on the Xen-specific line.
Exit chroot environment before you continue:
Create the OnApp package:
Import the OnApp Cloud Image
- SSH into the OnApp CP server.
Transfer over the template to the OnApp template store (On the OnApp CP server):
Insert Template in the Database and Finish up
Add the MySQL entry into OnApp:
Here is our example from earlier:
The final step is now to create the VS via either the OnApp Control Panel UI or the OnApp API using the template created above.
You will also need to clean up, remove the template file and database entry, and remove the LogVol from the Citrix installation using lvremove.