/
API power on/off VM

API power on/off VM

Overview

In this manual, you will find detailed information on how to prepare information, get VM status, and change status VM.

Procedure

Step 1: Prepare information

Login IAM portal -> vCD portal: collect the information

  • {{vcd_url}}

  • {{vm-uuid}}: select VM -> take a look vm uuid on url

  • {{Bearer Token}}: Please follow “API token login” document

Step 2: Get VM status

  • GET https://{{vcd_url}}/api/vApp/{{vm_uuid}}

  • Authorization: {{Bearer Token }}

  • Headers:

- ‘Accept’: */*;version=37.2

  • SEND request.

Check the VM status on line 3 of Response Body. If Link rel="power:powerOff", VM is Power ON else VM is Power Off

Step 3: Change status VM

  • POST https://{{vcd_url}}/api/vApp/{{vm_uuid}}/power/action/{{powerOn/powerOff}}

  • Authorization: {{Bearer Token}}

  • Headers:

- ‘Accept’: */*;version=37.2

  • SEND request.

Step 4: Verify

  • Get VM’s status information

GET https://{{vcd_url}}/api/vApp/{{vm-uuid}}

  • Check on vCD portal

Login IAM -> vCD portal-> select VM

End.

Related content

API reconfigures VM's Networks
API reconfigures VM's Networks
More like this
API reconfigures VM's CPU
API reconfigures VM's CPU
More like this
API token login
Read with this
Start and Stop Order of Virtual Machines in a vApp
Start and Stop Order of Virtual Machines in a vApp
More like this
API reconfigures VM's Disk
API reconfigures VM's Disk
Read with this
6. Encryption Management Service
6. Encryption Management Service
Read with this