Announcement

Collapse
No announcement yet.

Xen Virtual Machine migration using Snapshot

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xen Virtual Machine migration using Snapshot

    When it comes to migrating Virtual Machine from older Xen version (XCP 1.6 & older) to a new version (Xenserver 6.2), you cannot use the live migration option. In this case for migration we can use the export & import option but this will result in big downtime. Migrating the Virtual Machine using Snapshot will minimize the downtime.

    1) Create snapshot using following to commands.

    Code:
    xe vm-snapshot new-name-label=VM1_Snapshot uuid=2cc0444f-56bb-f816-fa19-ccc940913cf0
    Above uuid if of the vm for which snapshot is generated.

    The above command will generate the uuid for the snapshot & the snapshot will be in a template format. We have to set it to non-template format.

    Code:
    xe snapshot-param-set is-a-template=false uuid=03edea75-a9ff-147f-d17a-b5fd2a2eb765
    Above uuid if of the vm snapshot.

    2) Create a compressed backup of the vm using the snapshot. The backup should be created in a nfs folder which is mount on the host node & same folder will be mounted on the remote server.

    Code:
    xe vm-export compress=true filename=VM_Backup uuid=03edea75-a9ff-147f-d17a-b5fd2a2eb765
    The above command will create a backup file "VM_Backup" in the nfs mounted folder.

    3) Restoring the backup on remote server.

    Code:
    xe vm-import filename=VM_Backup sr-uuid=fcdf99d0-fbec-bb55-2ef5-00d40f9c4b63
    The sr-uuid is uuid of the local storage on new server.

    Once the backup is restored, you can shutdown old Virtual Machine & start new Virtual Machine. Make sure to install xen-tools on the new Virtual Machine.
    Regards,
    Sam
    System Admin

  • #2
    Re: Xen Virtual Machine migration using Snapshot

    Great tutorial Sam!

    Thanks for sharing.
    eUKhost Ltd.: eUK Web Hosting | eUK Dedicated Servers | eNlight Cloud Hosting | Build a Website
    Join our Affiliate program for free and earn up to 400 per sale!
    "A DECADE OF EXCELLENT SUPPORT"

    Comment

    Working...
    X