Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 207710

How to do a powerOn operation via the rest API

$
0
0

I am having some issues trying to powerOn a Vapp.  

The powerOn operation makes the VM go from "Powered Off" to "Partially Powered Off"...  Trying to figure out via the API how to make it really START the vm.  The VM is set to None as the default power operation, as we do not want the VM to start when the vapp starts automatically.  (Keep in mind if I break the start setup to default to power on, it will work - but that breaks the vapp settings to NOT start the vm's on deploy from the VCD gui)

 

post url:   HOST_URL/VM_REF_ID/power/action/powerOn

 

I have tried the "/powerOff" "/reset" "/reboot"  but those all give errors that the VM is not powered on.

 

The VCD gui has no issues - but the .NET API and the direct rest API seem to give me the issue.

 

 

Sample Rest Call:

POSTURL: https://server/api/v1.0/vApp/vm-11117064-9903-472a-9136-c788ba27cda3/power/action/powerOn

Type: " type "application/vnd.vmware.vcloud.vm+xml"

Body:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Vm type=\"application/vnd.vmware.vcloud.vm+xml\" href=\"https://server/api/v1.0/vApp/vm-11117064-9903-472a-9136-c788ba27cda3\">
</Vm>

 

 

 

Thanks


Viewing all articles
Browse latest Browse all 207710

Trending Articles