rajujith commented on code in PR #492: URL: https://github.com/apache/cloudstack-documentation/pull/492#discussion_r2039159533
########## source/adminguide/virtual_machines.rst: ########## @@ -960,6 +960,146 @@ restoreVirtualMachine call. In this case, the Instance's root disk is destroyed and recreated, but from the same Template or ISO that was already in use by the Instance. +Instance Lease +-------------- + +Cloudstack provides capability to create instance on lease. Lease denotes a set period for which resource is allocated and upon expiry cleanup is performed. +This feature enables automated cleanup of instances created for specific duration and for specific purpose. This feature gives administrators the ability to automatically reclaim +resources that are no longer needed by expired virtual machines, helping to optimize resource utilization and reduce wastage. + + +**Configuring lease feature** + +The cloud administrator can use global configuration variables to control the behavior of Instance Lease. +To set these variables, API or CloudStack UI can be used: + +======================================= ======================== +Configuration Description +======================================= ======================== +instance.lease.enabled Indicates whether to enable the Instance lease featuew, will be applicable only on instances created after lease is enabled. **Default: false** +instance.lease.scheduler.interval Background task interval in seconds that executes Lease expiry action on eligibile expired instances. Default: 3600. +instance.lease.alertscheduler.interval Background task interval in seconds that executes Lease alert for instances about to be expired in next N days. Default: 86400 +instance.lease.alert.daysbefore Denotes number of days (N) for alert task. Default: 7 days +======================================= ======================== + + +**Lease Parameters** + + +**leaseduration**: Lease duration is specified in days. This can take Natural numbers and -1 to disable the lease. + +Lease may require to be disabled in following scenarios: Review Comment: Users can disable the Instance Lease feature during instance deployment by unchecking the 'Enable Lease' option when using a Compute Offering that supports it. For existing instances with a lease already enabled, the lease can be removed by editing the instance and unchecking the 'Enable Lease' option. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org