I would like to know if it is possible to set an expiry date for an VM or not?
I don't want to automatically delete the VM from disk after the expiration. Some softer methods, such powering down or suspending the machine or even disconnecting the network is also good ways at the first step.
Any idea for that? I didn't find such things in the documents.
No, not possible out of the box. This is something vRealize Automation will do for you, however.
You can add a Tag or Customfield with a Date/Timestamp and fire up an external Powershell Script through Windows scheduling Tasks, which crawls trough your VMs and compare the timestamp. I think its a 30min scripting job.
Some notes: IIRC you can fetch the infos when a VM is startet or how long a VM is up and running. Also placing a Script within in thenGuestOS and checking every hour maybe a solution for you.
Regards,
Joerg
Can you explain about the Tag and Customfield?
Where are they? During the creation of VM? I haven't noticed about them.