I’ve had a fair number of folks ask me specifically what the functional differences are between runtime and storage leases in vCloud Director 5.1. More specifically – how do the various timers work, especially for an active vApp that tends to change states frequently. In this post, I’ll go over the mechanics of lease timers along with a few use case scenarios from the field.
As an added bonus, I’ve put together a brief HD video that shows you exactly what happens with the two types of lease timers as a vApp changes states from operational (powered on) to stopped (powered off). An embedded link is available at the end of this post, or you can visit it directly by clicking here.
Contents
A Lease Comparison
There are two leases available for a vApp in vCloud Director: runtime and storage. Both are configured at the Organization level inside of the Policies setting. While it is true that you can configure the lease timers on a per-vApp basis, the vApps provisioned within the Organization will use the configured Policy lease values by default.
The Runtime Lease
The runtime lease is a measure of how long a vApp will be allowed to maintain an operational state before it is stopped (powered off). I like to think of the runtime lease as a heartbeat that ensures that the owner still wants the vApp to be consuming compute resources. By default, when there are 5 days of runtime period left, vCloud Director will email the vApp owner with a warning that the vApp is reaching its runtime lease expiration. They can then choose to ignore or extend the lease.
If they ignore the runtime lease warning, vCloud will power off the vApp at the end of the runtime lease. In a Pay-as-you-Go or Allocation model, this results in compute reservations being released back to the Provider Virtual Data Center (VDC) for other Org VDCs to consume (or even the same Org VDC but for other vApps). In a Reservation model, the Org VDC reservation value stays the same but you are freeing up space in the Org VDC for other vApps.
If they extend the lease, the vApp remains powered on for an additional runtime lease value worth of time.
The Storage Lease
The storage lease does almost the exact same thing as the runtime lease, except that it is invoked only when the vApp is in a stopped state. This is opposite of when a runtime lease is active. Therefore, we can quickly determine that a runtime and storage lease do not run simultaneously.
The point of a storage lease is to do a heartbeat to the vApp owner (via an email warning) to let them know that the stopped vApp will ultimately be removed from the My Cloud vApps area and either permanently deleted or sent to the expired items area. The Org Policy ultimately determines which one of these actions are taken, and expired items is the default choice. Note that the expired items area still consumes storage, while the permanently delete option wipes the vApp from storage and frees up storage resources. A System or Org admin will ultimately need to keep cleaning out the expired items container.
Lease Timer Gotchas
Note that lease timers aren’t a set in stone value. There are some ways that cloud consumers can reset the timers without any special authorization.
- Start with a powered off vApp.
- When I power on a vApp, the storage lease timer resets and the runtime lease timer begins.
- If I power off the vApp, the runtime lease time resets and the storage lease timer begins.
By bouncing a vApp between powered on and powered off, I can effectively reset all of the lease timers.
vApp Bouncing Example
But don’t just take my word for it – here’s some screenshots.
Powered on vApp with a runtime lease expiring on 6/18/2013 at 11:11AM. There is no storage lease expiration because the vApp is powered on.
I then power off the vApp. Notice that the runtime lease has disappeared because the vApp is stopped. A storage lease expiration date now exists, set for 25 days from now.
Finally, I power the vApp back on. The new runtime lease expires at 11:14 AM, which is 3 minutes later than the original runtime lease expiration time. This also reflects roughly how long it took me to power off and then back on the vApp.
Video Explanation
As always, if you enjoyed the video please toss me a “Like” and if you want more videos on the channel I’d appreciate your subscription.
Thoughts
What this ultimately means is that you cannot count on lease timers to guarantee when a vApp will lease out unless you lock down the ability to control power on / off functions, which is not really that typical to do. It also proves that the two lease timers are mutually exclusive and reset each time a vApp stage change occurs (from on to off).