Ovirt 4.2.x Backup/Restore/Migrate

Migrate Citrix 7.2 Xen VM to oVIRT 4.2 VM (clonezilla)

238 views March 31, 2018 September 21, 2018 zipadmin 0

I would recommend using oVirt Simple Backup for this as it is the quickest way to migrate from XENSERVER to oVIRT.

Here is the process I found to work the best when migrating VMs from Citrix 7.2 Xen over to oVirt 4.2.

Note: My VMs are all Debian OS, so with other VM types you will likely run into some issues that I have not covered below.

 

You will require the following ISO images for this:

 

You will also need to create a NFS share that can be used for BOTH your XEN and oVIRT systems.

 

On XenServer

  • shutdown VM that you will be migrating
  • attach clonezilla.iso as bootable cd
  • Start VM in Recovery Mode
  • boot and create an image on NFS share (device-image) (fsck) (Enable OS Checks)
  • shutdown when done

In oVirt WebGUI

  • Create a new VM with the same size of HDD and RAM as original + NIC
  • Add clonezilla.iso as bootable cd
  • boot and create an image on your VM HDD from NFS share image (device-image) (restoredisk) (Check Image Yes)
  • shutdown when done
  • remove the CD clonezilla.iso and change to rescue.iso (http://www.system-rescue-cd.org/Download/)
  • choose either rescue64 or rescue32
  • choose first option (default)
  • once at command line:
    fsarchiver probe simple #(to retrieve your partition list)
    mkdir /mnt/linux
    mount /dev/sda1 /mnt/linux
    mount -o bind /proc /mnt/linux/proc
    mount -o bind /dev /mnt/linux/dev
    mount -o bind /sys /mnt/linux/sys
    chroot /mnt/linux /bin/bash
    vi /etc/default/grub #change "console=hvc0" to ""
    update-grub
    update-initramfs -u
    grub-install /dev/sda
    exit
    umount /mnt/linux/dev/
    umount /mnt/linux/proc/
    umount /mnt/linux/sys/
    umount /mnt/linux/
    shutdown 0 -h

     

  • remove CD from VM
  • start VM
  • On command line of VM enter:
    • apt-get remove xe-guest-utilities
      apt-get install ovirt-guest-agent
      shutdown 0 -h

       

In oVirt WebGUI

  • Navigate to the VM -> Disks
    • Make sure the VM is Not Running
    • Click your main disk
    • Scan Alignment
      • If Alignment is okay, then all should be good
      • If Alignment is Misaligned, then do the following:
        • Boot the VM to the command line
          • using fdisk, delete the partition for your swap
          • using fdisk, create a new primary partition for your swap
          • using fdisk, “type” the new partition to 82
          • using fdisk, write the changes and then reboot the VM
        • After reboot to the command line
          mkswap /dev/sdXX #(example: mkswap /dev/sda2)
          swapon /dev/sdXX
          vi /etc/fstab  #change the UUID for SWAP to the new UUID for /dev/sda2)
          free -m #(should show active swap)
          reboot

           

 

Was this helpful?