Xen Cloud Platform (XCP) – XenCenter Snapshot Issue
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