Update: 20140414: Newer Cloudstack installations might need vhd-util top be copied to /opt/cloud/bin/ manually on the XenServer. It exists on my installations. YMMV
A frequently asked question on the CloudStack mailing list is whether CloudStack 4.2 supports XenServer 6.2 as many users have faced problems adding XenServer hosts into their CloudStack infrastructure.
The answer is an emphatic YES. CloudStack 4.2.0 is the first release of CloudStack to fully support XenServer 6.2 and works very well.
Most of the integration issues faced by users seems to be around 2 missing steps:
- Failed to download vhd-util to /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util on the CloudStack management server BEFORE adding the XenServer hosts. /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util is the only location where vhd-util is required to be present. CloudStack management server will automatically copy vhd-util to the XenServer hosts when you add them
- Failed to create XenServer traffic labels using either XenCenter Windows Tool or the “/opt/xensource/bin/xe network-param-set” command line interface BEFORE adding the host
Both of these steps are well documented in the XenServer Installation for CloudStack section of the Installation Guide.
Adding a XenServer host to CloudStack is really simple once the vhd-util and traffic labels steps are completed:
- Install XenServer hosts from the Installation ISO
- Create a XenServer pool. Really simple if you use XenCenter on a Windows host
- Set the traffic labels. Use XenCenter or via “xe” CLI
- Add the pool master as the first host into CloudStack. CloudStack will automatically add the remaining hosts from the pool. Of course, if you dont have a pool, just add the XenServer host individually.
And that’s all there is to it.
Update #1 (20140414)
To make debugging easier, below are some additional information pertaining to vhd-util:
- The vhd-util binary already exists on a XenServer 6.2 installation as /usr/bin/vhd-util and is part of the XenServer package blktap-2.0.90.xs733-xs6.2.0.
[root@vxen1-2 ~]# whereis vhd-util
vhd-util: /usr/bin/vhd-util /opt/xensource/bin/vhd-util /opt/cloud/bin/vhd-util
[root@vxen1-2 ~]# rpm -qf /usr/bin/vhd-util
[root@vxen1-2 ~]# ls -l /usr/bin/vhd-util
-rwxr-xr-x 1 root root 5908 Nov 28 20:09 /usr/bin/vhd-util
[root@vxen1-2 ~]# ls -l /opt/xensource/bin/vhd-util
-rwxr-xr-x 1 root root 318977 Dec 20 22:21 /opt/xensource/bin/vhd-util
[root@vxen1-2 ~]# ls -l /opt/cloud/bin/vhd-util
-rwxr-xr-x 1 root root 318977 Jan 11 10:12 /opt/cloud/bin/vhd-util
- /usr/bin/vhd-util binary from the blktap RPM is very different than the one available from the http://download.cloud.com.s3.amazonaws.com/tools/vhd-util as /usr/bin/vhd-util supports the -S option for create. Certain CloudStack operations might require the -S option to work correctly.
[root@vxen1-2 ~]# /usr/bin/vhd-util create
options: <-n name> <-s size (MB)> [-r reserve] [-h help] [<-S size (MB) for metadata preallocation (see vhd-util resize)>]
[root@vxen1-2 ~]# /opt/cloud/bin/vhd-util create
options: <-n name> <-s size (MB)> [-r reserve] [-h help]