From 8868797385d8b0973a164f5ad34759191cb88735 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 2 Jun 2020 16:18:56 +0530 Subject: [PATCH 1/2] kvm: direct download templates for system VM System VMs now support direct download templates. Different direct download timeouts have been made configurable with new global settings. Signed-off-by: Abhishek Kumar --- .../_bypass-secondary-storage-kvm.rst | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/source/adminguide/templates/_bypass-secondary-storage-kvm.rst b/source/adminguide/templates/_bypass-secondary-storage-kvm.rst index 7f6de4cf4e..edfa291a59 100644 --- a/source/adminguide/templates/_bypass-secondary-storage-kvm.rst +++ b/source/adminguide/templates/_bypass-secondary-storage-kvm.rst @@ -17,7 +17,7 @@ .. _bypass-secondary-storage-kvm: Bypassing Secondary Storage For KVM templates --------------------------------------------- +--------------------------------------------- CloudStack provides an additional way to register and use templates on KVM. @@ -41,6 +41,13 @@ To enable this option for a template: After the template is registered, it is automatically available for VM deployments. +From CloudStack 4.14.0, system VM also support direct download templates. 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. Type of newly registered template can be changed to SYSTEM in the database using a SQL query similar to: + +.. code:: bash + + UPDATE cloud.vm_template SET type=’SYSTEM’ WHERE uuid=’UUID_OF_NEW_TEMPLATE’; + + Uploading Certificates for Direct Downloads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For direct downloads over HTTPS, the KVM hosts must have valid certificates. These certificates can be either self-signed or signed and will allow the KVM hosts to access the templates/ISOs and download them. @@ -78,7 +85,7 @@ CloudStack provides some APIs to handle certificates for direct downloads: upload templatedirectdownloadcertificate hypervisor=KVM name=CERTIFICATE_ALIAS zoneid=ZONE_ID certificate=CERTIFICATE_FORMATTED hostid=HOST_ID Syncronising Certificates for Direct Downloads -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As new hosts may be added to a zone which do not include a certificate which was previously uploaded to pre-existing hosts. @@ -88,3 +95,14 @@ CloudStack provides a way to synchronize certificates across all the connected h - Enumerate the connected hosts in a zone - Check which hosts are missing the certificates which have been already uploaded to other hosts - Upload missing certificates to hosts + +Direct Download Timeouts +~~~~~~~~~~~~~~~~~~~~~~~~ + +With 4.14.0, ability to configure different timeout values for the direct downloading of templates has been added. Three new global settings have been added for this: + +- **direct.download.connect.timeout** - Connection establishment timeout in milliseconds for direct download. Default value: 5000 milliseconds. + +- **direct.download.socket.timeout** - Socket timeout (SO_TIMEOUT) in milliseconds for direct download. Default value: 5000 milliseconds. + +- **direct.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. From 231ee183cb9ebe0d2ace152b3c47ad0be2fbc116 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 2 Jun 2020 17:25:25 +0530 Subject: [PATCH 2/2] suggestion applied Co-authored-by: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> --- source/adminguide/templates/_bypass-secondary-storage-kvm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/adminguide/templates/_bypass-secondary-storage-kvm.rst b/source/adminguide/templates/_bypass-secondary-storage-kvm.rst index edfa291a59..d45f0489df 100644 --- a/source/adminguide/templates/_bypass-secondary-storage-kvm.rst +++ b/source/adminguide/templates/_bypass-secondary-storage-kvm.rst @@ -41,7 +41,7 @@ To enable this option for a template: After the template is registered, it is automatically available for VM deployments. -From CloudStack 4.14.0, system VM also support direct download templates. 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. Type of newly registered template can be changed to SYSTEM in the database using a SQL query similar to: +From CloudStack 4.14.0, system VM templates also support direct download. 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. Type of newly registered template can be changed to SYSTEM in the database using a SQL query similar to: .. code:: bash