Xen Cloud Platform (XCP) – XenCenter Snapshot Issue

image_pdfimage_print

When using XenCenter in conjunction with XCP you will find that you are unable to take snapshots of your virtual machines in XenCenter. XenCenter will spew up an error saying “Snapshots require XenServer 5.5 or later”.

This seems very strange since XCP is based on XenServer 5.6.0-fp1. It turns out that the XCP xapi needs to be patched to fool XenCenter into thinking that XCP is 5.6.0. Here is how you do it.

First stop the xapi service:

/etc/init.d/xapi stop

Then backup the xapi binary:

cp /opt/xensource/bin/xapi /opt/xensource/bin/xapi.orig

Now patch the binary with the new version information:

/usr/bin/perl -pi -e 's/1\.1\.0/5.6.0/g' /opt/xensource/bin/xapi

Start xapi:

/etc/init.d/xapi start

Thats it! You now should be able to take snapshots of your virtual machines within XenCenter.

Here is a script to automate the process:

#!/bin/bash

#Script to fix XCP / XenCenter Snapshot issue
#By: Ronny L. Bull
#Version: 1.0
#Date: 8-9-2011


XCPVER=`xapi -version | grep PRODUCT_VERSION | cut -c17-21`

#stop the xapi service
/etc/init.d/xapi stop

#backup the binary
cp /opt/xensource/bin/xapi /opt/xensource/bin/xapi.orig

echo "Patching the xapi binary"

#patch the binary with the new version number
/usr/bin/perl -pi -e 's/\$XCPVER/5.6.0/g' /opt/xensource/bin/xapi

#start the xapi service
/etc/init.d/xapi start

5 Responses to “Xen Cloud Platform (XCP) – XenCenter Snapshot Issue”


  1. Jordi

    First of all: thank you!

    It solved snapshot issue, but now it tells “XenServer Tools out of date (version 1.1 installed), and no Disk or Network info is shown.

    In order to solve it, I logged into each virtual machine and changed in

    /usr/sbin/xe-update-guest-attrs
    
    xenstore_write_cached "attr/PVAddons/MajorVersion" "5"
    xenstore_write_cached "attr/PVAddons/MinorVersion" "6"
    

    I installed Debian 6.02 virtual machines.

  2. Jordi

    In Windows, you have to edit the register:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\XenTools]
    "MajorVersion"=dword:00000005
    "MinorVersion"=dword:00000006
    
  3. Ronny

    Thanks for the information Jordi! I edited your comments so that the syntax you provided was displayed in the code blocks for readability.

  4. adhi

    Hi Sir,
    I’m running on XCP 1.1 and do this tweak and also refer from Xen wiki “wiki.xen.org/wiki/XenCenterXCP”

    I have XCP connected with iSCSI, and all VM attached the virtual disk on this iSCSI.
    for 2 weeks after VM ceation and schedule snapshot creation was ok, but this day the schedule snapshot was stopped and also manual snapshot doesn’t work.

    the error was appear “Snapshot chain is too long”
    I try to reclaim VM disk using this method support.citrix.com/article/CTX123400 but problems still appears.

    would you help me ?

  5. Josh

    I have a issue with my snapshot and backups it tells me the chain is to long, is their away to reset the chain length in xen centre/server 5.6?

    thanks.

    Josh