For some time now, CloudStack has supported the direct download of user templates for the KVM hypervisor. This basically allows user to register a template (whilst bypassing secondary storage) and directly download and install it to primary storage where it can be used for deployment:

With CloudStack 4.14, this has been improved by adding direct download support for system VM templates. Previously, administrators could register new system VM templates with the direct download flag, but this flag was not honoured and there would be a failure during system VM deployment. Now, an administrator can register a new system VM template as ROUTING or USER type with the direct download flag, and it can be changed to SYSTEM type during the upgrade or by out-of-band database changes. The type of the newly registered template can be changed to SYSTEM in the database using a SQL query similar to:

UPDATE cloud.vm_template SET type=’SYSTEM’ WHERE uuid=’UUID_OF_NEW_TEMPLATE’;

Recreation of the system VM will now result in using the newly registered direct download template, and the new system VM will work as normal once deployed. With this feature, an administrator could run their datacenter using CloudStack without requiring secondary storage.

The new release also adds the ability to configure different timeout values for the direct downloading of templates. Three new global settings have been added:

  • download.connect.timeout – Connection establishment timeout in milliseconds for direct download. Default value: 5000 milliseconds.
  • download.socket.timeout – Socket timeout (SO_TIMEOUT) in milliseconds for direct download. Default value: 5000 milliseconds.
  • download.connection.request.timeout – Requesting a connection from connection manager timeout in milliseconds for direct download. Default value: 5000 milliseconds. This setting is hidden and not visible in UI.