Archive/Using XenCenter to manage XCP: Difference between revisions

From Xen
Jump to navigationJump to search
Line 21: Line 21:
so we apply a similar fix to make xe-guest-utilities report a XenServer compatible version. Courtesy of [[http://lists.xensource.com/archives/html/xen-api/2011-10/msg00037.html http://lists.xensource.com/archives/html/xen-api/2011-10/msg00037.html]]
so we apply a similar fix to make xe-guest-utilities report a XenServer compatible version. Courtesy of [[http://lists.xensource.com/archives/html/xen-api/2011-10/msg00037.html http://lists.xensource.com/archives/html/xen-api/2011-10/msg00037.html]]


On each (Linux) guest with xe-guest-utilities (Xen Tools) installed:
On each Linux guest with xe-guest-utilities (Xen Tools) installed:
<pre>
<pre>
sed -i /usr/sbin/xe-update-guest-attrs -e 's/MajorVersion" "1"/MajorVersion" "5"/'
sed -i /usr/sbin/xe-update-guest-attrs -e 's/MajorVersion" "1"/MajorVersion" "5"/'
Line 28: Line 28:
# wait 2 minutes and check XenCenter again
# wait 2 minutes and check XenCenter again
</pre>
</pre>
<br>
On each Windows guest with Xen Tools installed, modify the following registry values in ''Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\XenTools''<br>
and reboot the guest or restart the 'Citrix Tools for Virtual Machine Service' service
{| border="1" cellpadding="2" cellspacing="0" style="text-align:center"
| '''Name'''
| '''Data (hex)'''
|-
| MajorVersion
| 5
|-
| MicroVersion
| 6
|-
| MinorVersion
| 100
|}


= Fix #2 license expiry warning in XenCenter =
= Fix #2 license expiry warning in XenCenter =

Revision as of 05:45, 18 November 2011

Citrix XenCenter can be used to manage your XCP hosts, just as if it was a Citrix XenServer host.

Many users will note (and be confused by) the fact that XenCenter reports the XCP client's license is invalid or expiring.
In short, don't worry about it, XCP is free and doesn't have a license. It's just a compatibility issue.
You may further note that some features in XenCenter seem to be disabled (like snapshots).

There are some simple fixes described below to resolve these issues.

XCP 1.1 is intended to include built-in fixes for the below compatibility issues.

Fix #1 to fix API version and enable snapshots in XenCenter

From XCP 1.0 RC3 (build number > 40948) you can trick XenCenter by modifying the config file /etc/xensource/xapi_version_override which contains a single line containing the required version number.
The version number to set it to for XenCenter compatibility is 5.6.100. This is the version string of XenServer 5.6 FP1 and SP2, and will work for XCP 1.0 and 1.1.

echo "5.6.100" > /etc/xensource/xapi_version_override
/etc/init.d/xapi restart

Unfortunately after applying the above fix XenCenter reports that XenTools is outdated and some operations will fail (vm-migration)
so we apply a similar fix to make xe-guest-utilities report a XenServer compatible version. Courtesy of [http://lists.xensource.com/archives/html/xen-api/2011-10/msg00037.html]

On each Linux guest with xe-guest-utilities (Xen Tools) installed:

sed -i /usr/sbin/xe-update-guest-attrs -e 's/MajorVersion" "1"/MajorVersion" "5"/'
sed -i /usr/sbin/xe-update-guest-attrs -e 's/MinorVersion" "1"/MinorVersion" "6"/'
sed -i /usr/sbin/xe-update-guest-attrs -e 's/MicroVersion" "0"/MicroVersion" "100"/'
# wait 2 minutes and check XenCenter again


On each Windows guest with Xen Tools installed, modify the following registry values in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\XenTools
and reboot the guest or restart the 'Citrix Tools for Virtual Machine Service' service

Name Data (hex)
MajorVersion 5
MicroVersion 6
MinorVersion 100

Fix #2 license expiry warning in XenCenter

vi /etc/expiry.sh
###
#!/bin/bash
#Script to fix XCP 30 License expire issue
#Script increases the month value by 1
#By: Ronny L. Bull & Alex Stuart
#Version: 1.0
#Date: 8-9-2011
 
FUTURE=`date --date="next Month" '+%Y%m%d'`
 
#stop xapi service
/etc/init.d/xapi stop
 
#Replace the expiry entry
sed -i "s/\(expiry.\{3\}\)[0-9]\{8\}/\1$FUTURE/" /var/xapi/state.db
 
#start xapi service
/etc/init.d/xapi start

###
bash /etc/expiry.sh

This could be setup as an automated task if desired.

Fix #3 to enable the Import feature of XenCenter

Insert the Citrix XenServer disc or mount the ISO on the XCP server

mount /dev/cdrom /mnt
cd /mnt/packages.transfer-vm/
rpm -ivh xenserver-transfer-vm-6.0.0-50762p.noarch.rpm (this RPM may rename with different releases)

You can now use File -> Import from within XenCenter to migrate virtual machines from other technologies such as VMware or Xen Desktop