VMware Cloud Community
sampsonl
Contributor
Contributor

How to get Cloud Director to synch with VMs status

I am using the Cloud Director REST APIs to manage our VMs.  During testing I monitor the tests using the Cloud Director console. After the test has been run the Cloud Director conosle reports a wrong status for the VM but when I check it using vCenter the correct status is displayed.  The test is executed using jUnit.  The test logs into Cloud Director, executes a power on action on our test Vapp, waits for it to complete, then executes a power off on the Vapp, waits for it to complete and then exits.  The status shows the VM as being running, the API and vCenter reports it correctly as stopped.  I have selected the refresh option on the console repeatdely, logged off and back in only to see the status not be updated. I then select the VM from the Cloud Director console and request for it to be stopped and that seems to trigger an update.  Bug or is there an update option on the console I am missing?

Thanks,

Tags (3)
0 Kudos
1 Reply
admin
Immortal
Immortal

vCloud Director syncs the vCenter Server's inventory periodically and caches it.  The cached data is then displayed in the VCD Web console.  Clicking Refresh in the UI will refresh the data from the cache, but it doesn't force a sync (there's no way to force the cache to be updated).  I can't recall if power state queries via the API result in synchronous requests to vCenter Server or which DB tables it's getting information from (vs. the DB views used for the UI).

Updates won't be instantaneous and may take several minutes.  How long are you waiting between power state changes and refreshing the UI?

0 Kudos