VSphere Java SDK: How to get the time when Virtual Machine was powered off
For getting Powered on Time, I am using
vm.getRuntime().getBootTime().getTime();
Problem is as per VM docs bootTime property is erased when Machine State changes from Powered on to off.
I tried using recent tasks but vm.getRecentTasks() is not returning any thing.
VM here means Virtual Machine Object