updateSnapshots(vm);
}
@Override
protected synchronized void updateRuntime(ManagedObject mo) throws Exception {
VirtualMachine vm = (VirtualMachine)mo;
this.runtime = checkReady(vm.getRuntime());
Summary summary = checkReady(vm.getSummary());
StorageSummary storageSummary = checkReady(summary.getStorage());
storageUsage = new DiskSize(storageSummary.getUnshared());
storageCommitted = new DiskSize(storageSummary.getCommitted());
/* XXX Layout needs to be updated in both update() and updateRuntime()
* as it contains both configuration & runtime data.
*/
this.layoutEx = checkReady(vm.getLayoutEx());
/**
* VC sometime can get out of sync with hostd on VM's power state.
* This cachedPowerState is computed base on return values of events
* and/or VC calls, which may be different from VC's runtime state.
* We trust cachedPowerState more than runtime state if they are out of sync.