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.
[text]
[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
blktap-2.0.90.xs733-xs6.2.0
[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
[/text] - /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.
[shell]
[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]
[/shell]
5 replies on “CloudStack And XenServer vhd-util”
Very informative specially for new people exploring virtualization.
Kindly do more of these stuff, good job! Thanks!
Glad you found it useful.
Hi,
I’m trying to build a cloud platform using CloudStack 4.2.1 and XenServer 6.2SP1.
I have this issue :
http://mail-archives.apache.org/mod_mbox/cloudstack-issues/201312.mbox/%3CJIRA.12686663.1388308737793.19758.1388308850120@arcas%3E
“vhd-util isn’t compatible with cloudstack”
the vhd-util installed by the Xenserver ISO seems to have this option, but my systemVM still not starting.
Any idea ?
Regards,
hug
Hi Hug,
I did see this bug being mentioned on the mailing list. I haven’t run into this issue on my setup probably because I use NFS for my primary store.
The CloudStack mailing list(s) would be a better place to find a solution.
Regards.
[…] installed vhd-util and the CloudStack installed version. Shanker Balan has some comments on this on his blog, but so far I’ve not managed to get it fully working due to problems with copying VM […]