Migration away from to may cause problems in exisiting cloudstack installations and versions


Cloudstack relies on a fixed download site when it fetches the built-in guest VM templates.
That download site has historically been and is being replaced by is now fully functional. The retirement date of is unknown but expected to be imminent

The issue & behaviour

After the retirement of, the following issues may be experienced:

  • When installing CloudStack for the first time, failures will occur when downloading the built-in templates
  • For existing installations of CloudStack, if administrators or users attempt to re-download a template (for example when creating a new zone) failures will occur.

Versions affected

This issue affects Apache CloudStack version 4.9.2 and ALL PRIOR VERSIONS

CloudStack 4.10, due for release imminently, is NOT affected by this issue. Future versions should not be affected by this issue.


The following steps will update an existing CloudStack installation to use the new download site. This process should also be followed (in advance of installation) when attempting to install a new instance of CloudStack for affected versions.

1. List the URLs to update
Locate the ‘cloud’ database and run this SQL command against it, replacing <user-id> and <your password>
NOTE: this requires having the MySQL client installed on the location that you are running the command from.

$ echo "SELECT id,url FROM vm_template WHERE url LIKE '' AND NOT removed IS NULL\g" | mysql -h <cloud db server ip or hostname> -u <user-id> -p<your password> cloud

This will return all URLs that CloudStack uses for downloads that are pointing to

A number of rows should be returned. The following is a sample output

id  url



If no rows are  returned you are not affected by this issue; you need to do nothing further. If rows are returned, proceed to step 2

2. Check that ALL templates are present on the new download site.

All templates that were previously located at should be in an identical location at However, we advise that you confirm this  by to attempting to manually  download all of  the templates from the same directory at

To do this, take every result returned at step 1 and attempt to manually  download them from the same location at

Taking the above examples check that you are able to  download:

(the files don’t actually need to be downloaded at this stage, you are just checking for their existence)

If all templates are present, then continue to step 3. If any are missing (you will receive a 404 error), then contact or your support provider

3. Update the URLs in the vm_template table

WARNING – Extreme care must always be taken when directly manipulating the database.  Ensure that you have a very recent backup.
Update any URL’s that point to This can be performed by running:

$ echo "UPDATE vm_template SET url = REPLACE(url, '', '') WHERE INSTR(url, "") > 0 AND removed IS NULL;" | mysql -h <cloud db server ip or hostname> -u <user-id> -p<your password> cloud

4. Double check the update

Running the following command should return the same IDs as before, but with the new download location

$ echo "SELECT id,url FROM vm_template WHERE url LIKE '' AND NOT removed IS NULL\g" | mysql -h <cloud db server ip or hostname> -u <user-id> -p<your password> cloud


Related Posts:

Download a step-by-step guide to migrate your existing vSphere environment to a robust IaaS cloud environment based on Apache CloudStack and the KVM Hypervisor, ensuring a smooth, low-friction migration journey.