EasyManua.ls Logo

VMware VCLOUD API 1.0 - API

VMware VCLOUD API 1.0 - API
212 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VMware, Inc. 81
Chapter 5 Datacenter Operations
Example 5-19. Deploy and Power On a vApp or Virtual Machine
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/deploy
Content-type: application/vnd.vmware.vcloud.deployVAppParams+xml
...
<DeployVAppParams powerOn="true" xmlns="http://www.vmware.com/vcloud/v1"/>
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... operation="Starting Virtual Application Linux FTP server (7) ...>
...
</Task>
Undeploy a vApp or Virtual Machine
UndeployingavApppowersofforsuspendsanyrunningvirtualmachinesitcontains,thenfreesthe
resourcesreservedforthevAppandsetsthevApp’sdeployedattributetoavalueoffalsetoindicatethatit
isnotdeployed.
Undeployingavirtualmachinepowersofforsuspendsthevirtualmachine,then
freestheresourcesreserved
foritandsetstheitsdeployedattributetoavalueoffalsetoindicatethatitisnotdeployed.Thisoperation
hasnoeffectonthecontainingvApp.
ThesaveStateattributespecifieswhethertheundeployedvirtualmachinesaresuspendedandtheirsuspend
statesaved,orsimply
poweredoff.
TherequestbodyineachcaseisanUndeployVAppParamselement.
Example 5-20. Undeploy a vApp or Virtual Machine
RequesttoundeployavApp:
POST http://vcloud.example.com/api/v1.0/vApp/vapp-7/action/undeploy
Content-type: application/vnd.vmware.vcloud.undeployVAppParams+xml
...
<UndeployVAppParams saveState="true" xmlns="http://www.vmware.com/vcloud/v1"/>
RequesttoundeployaVm:
POST http://vcloud.example.com/api/v1.0/vApp/vm-5/action/undeploy
Content-type: application/vnd.vmware.vcloud.undeployVAppParams+xml
...
<UndeployVAppParams saveState="true" xmlns="http://www.vmware.com/vcloud/v1"/>
Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ...>
...
</Task>
Power On a vApp or Virtual Machine
ApowerOnrequesttoavAppURLpowersonallofthevirtualmachinesinthevApp,asspecifiedinthevApp’s
ovf:StartupSectionelement.
ApowerOnrequesttoavirtualmachineURLpowersonthespecifiedvirtualmachineandforcesdeployment
oftheparentvApp.

Table of Contents

Related product manuals