VMware {code} Community
SimonCigoj
Contributor
Contributor
Jump to solution

wrong status of the vapp after powerOff

I have a situation where I nead to make sure that the vap is POVERED_OFF or POWERED_ON but I get strange status readings for example

directly after the command

_vapp.powerOff().waitForTask(0);

the status reading from

_vapp.getVappStatus()

is still POWERED_ON it should be POWERED_OFF

How can I get the accurate status off the vapp?

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
cfor
Expert
Expert
Jump to solution

_vapp.getVappStatus()  the status could already be cached...


_vapp.powerOff().waitForTask(0);

_vapp = Vapp.GetVappByReference(client, _vapp.Reference)

_vapp.getVappStatus()



Also are you sure you just need to power off...  you might also need to undeploy if you really want it stopped  (tear down the vapp network) .  I think undeploy also can do the poweroff for you. 

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

View solution in original post

Reply
0 Kudos
1 Reply
cfor
Expert
Expert
Jump to solution

_vapp.getVappStatus()  the status could already be cached...


_vapp.powerOff().waitForTask(0);

_vapp = Vapp.GetVappByReference(client, _vapp.Reference)

_vapp.getVappStatus()



Also are you sure you just need to power off...  you might also need to undeploy if you really want it stopped  (tear down the vapp network) .  I think undeploy also can do the poweroff for you. 

ChrisF (VCP4, VCP5, VCP-Cloud) - If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
Reply
0 Kudos