Deploying the Cloudforms appliance template in vCloud Director

Red Hat provides the Cloudforms software nicely packaged as a Vmware OVA template; unfortunately this means that some manual work is required to deploy it under vCloud Director. Note that this blog post only talks about getting the template in vCloud Director; managing a vCloud Director provider is outside the supported list of Cloud providers for Cloudforms.

Once we have downloaded the Cloudforms software, the first thing is converting the template from OVA to OVF formats - the only supported format for vCloud Director.

# ovftool cfme-vsphere- cfme-vsphere-
Opening OVA source: cfme-vsphere-
Opening OVF target: cfme-vsphere-
Writing OVF package: cfme-vsphere-
Transfer Completed                    
 - Wrong file size specified in OVF descriptor for 'disk.vmdk' (specified: 42949672960, actual 707240448).
 - No manifest entry found for: 'disk.vmdk'.
 - No manifest file found.
Completed successfully

Note there is a warning message regarding the disk.vmdk file; this is due the template being in Thin format. In order to vCloud to accept the OVF file, it is necessary we modify the produced cfme-vsphere-*.ova with the right size:

sed -i 's#42949672960#707240448#g' cfme-vsphere-*.ovf

Once we have done that, we need to ammend the Manifest file with the right sha1sum:

# sha1sum  cfme-vsphere-
17df197d9ef7859414aac0f6703808a9a8b99286  cfme-vsphere-

# cat
SHA1(cfme-vsphere- 17df197d9ef7859414aac0f6703808a9a8b99286
SHA1(cfme-vsphere- 696baa7f8803beca7be2ad21cde2b6cc975c6c57

Finally, we can import the Template into vCloud Director itself, using again the ovftool software:

# ovftool --vCloudTemplate cfme-vsphere-  "vcloud://"
Opening OVF source: cfme-vsphere-
The manifest validates
Enter login information for target vcloud://
Username: myuser
Password: *******
Opening vCloud target: vcloud://
Deploying to vCloud vApp template: vcloud://
Transfer Completed
Completed successfully

Once we complete that step, the template is available to start deploying a new Cloudforms VM.

Happy hacking!