You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/adminguide/service_offerings.rst
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -401,6 +401,31 @@ To create a new compute offering:
401
401
- **Disk Offering Strictness**: This flag defines the strictness of the disk offering association
402
402
with the compute offering. When set to true, overriding of disk offering is not allowed on deploy instance
403
403
and change disk offering is not allowed for the ROOT disk
404
+
405
+
- **Enable Lease**: When this flag is enabled, compute offering is created with lease related metadata.
406
+
In CloudStack, a lease represents the specific duration for which an instance is allocated.
407
+
The user rents these resources for the duration of the lease. Once the lease period expires, instance may be stopped or destroyed.
408
+
Lease information is inherited from compute offering and gets associated to Instance.
409
+
410
+
When the flag is enabled
411
+
412
+
- **Lease Duration (in days)**: Creates a compute offering with Lease duration. Instance created from this compute offering will inherit lease duration by default.
413
+
414
+
- **Lease expiry action**: Denotes lease expiry action, which gets executed upon lease expiry for instances created from compute offering.
415
+
Suported values for lease expiry action are as follows:
Copy file name to clipboardExpand all lines: source/adminguide/virtual_machines.rst
+107Lines changed: 107 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -960,6 +960,113 @@ restoreVirtualMachine call. In this case, the Instance's root disk is
960
960
destroyed and recreated, but from the same Template or ISO that was
961
961
already in use by the Instance.
962
962
963
+
Instance Lease
964
+
--------------
965
+
966
+
Cloudstack provides capability to create instance on lease. Lease denotes a set period for which resource is allocated and upon expiry cleanup is performed.
967
+
This feature enables automated cleanup of instances created for specific duration and for specific purpose. This feature gives administrators the ability to automatically reclaim
968
+
resources that are no longer needed by expired virtual machines, helping to optimize resource utilization and reduce wastage.
969
+
970
+
971
+
**Configuring lease feature**
972
+
973
+
The cloud administrator can use global configuration variables to control the behavior of Instance Lease.
974
+
To set these variables, API or CloudStack UI can be used:
instance.lease.enabled Indicates whether to enable the Instance lease featuew, will be applicable only on instances created after lease is enabled. **Default: false**
982
+
instance.lease.scheduler.interval Background task interval in seconds that executes Lease expiry action on eligibile expired instances. Default: 3600.
983
+
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
984
+
instance.lease.alert.daysbefore Denotes number of days (N) for alert task. Default: 7 days
Lease duration is specified in days. This can take Natural numbers and -1 to disable the lease.
1031
+
Lease can be disabled:
1032
+
- During deployment of instance while using lease based compute offering
1033
+
- Update instance with existing lease
1034
+
1035
+
**leaseexpiryaction**
1036
+
There are 2 actions supported:
1037
+
- STOP: The instance is stopped, and it will be out of lease. The user can restart the instance manually.
1038
+
- DESTROY: The instance is destroyed when the lease expires.
1039
+
1040
+
.. note:: Action is executed at most once on the instance, e.g. STOP action will bring instance in Stoppped state on expiry and instance will be out of lease. User may choose to start it again.
1041
+
1042
+
1043
+
**Editing Instance Lease**
1044
+
1045
+
The lease duration for an instance can be extended, reduced, or disabled for instances that already have an active lease.
1046
+
However, it is not possible to enable the lease on an instance after it has already been deployed.
0 commit comments