One of the features I love about vRealize Automation is the ability to give out leases to various business groups for their VMs. It’s fantastic for Dev and QA environments. One annoying thing however, is that the default notification for expiration is 7 days, and there is no apparent way to change it in the UI. In fact it would be nice if we could send multiple warnings out. Perhaps the first warning 7 days before, and the second warning a day before the VM expires? That’s for a future discussion though.
For now, here is how to change the number of days before the user is sent a lease expiration notification:
1. RDP to your IaaS Windows Server and locate the “ManagerService.exe.config” file located in “C:\Program Files (x86)\VMware\vCAC\Server”
2. Open the file and search for “DaysNotifcationBeforeExpire”. The default should be set to “7”.
Change it to the number of days you desire? I personally like a 2 day notification, but it’s really a preference that makes sense for the users of your Cloud.
Note: While you are here you can also adjust many other automatic e-mail notification events from their defaults. Anything you change to true will result in an e-mail notification. For example: Changing PowerOff=”false” to PowerOff=”true” will result in an e-mail notification every time the machine is powered off.
3. Save the File
4. Restart the vCloud Automation Center Service
Select Start > Administrative Tools > Services and restart the vCloud Automation Center service.
And there you have it! Lease expiration notifications when you want them!
While this solves the problem, hopefully VMware will create the LeaseExpirationNotifcation as a Stub so that we can call out directly to a vRO workflow when the lease is about to expire.