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
Undeployingî ±aî ±vAppî ±powersî ±offî ±orî ±suspendsî ±anyî ±runningî ±virtualî ±machinesî ±itî ±contains,î ±thenî ±freesî ±theî ±
resourcesî ±reservedî ±forî ±theî ±vAppî ±andî ±setsî ±theî ±vApp’sî ±deployedî ±attributeî ±toî ±aî ±valueî ±ofî ±falseî ±toî ±indicateî ±thatî ±itî ±
isî ±notî ±deployed.
Undeployingî ±aî ±virtualî ±machineî ±powersî ±offî ±orî ±suspendsî ±theî ±virtualî ±machine,î ±thenî ±
freesî ±theî ±resourcesî ±reservedî ±
forî ±itî ±andî ±setsî ±theî ±itsî ±deployedî ±attributeî ±toî ±aî ±valueî ±ofî ±falseî ±toî ±indicateî ±thatî ±itî ±isî ±notî ±deployed.î ±Thisî ±operationî ±
hasî ±noî ±effectî ±onî ±theî ±containingî ±vApp.
Theî ±saveStateî ±attributeî ±specifiesî ±whetherî ±theî ±undeployedî ±virtualî ±machinesî ±areî ±suspendedî ±andî ±theirî ±suspendî ±
stateî ±saved,î ±orî ±simplyî ±
poweredî ±off.
Theî ±requestî ±bodyî ±inî ±eachî ±caseî ±isî ±anî ±UndeployVAppParamsî ±element.
Example 5-20. Undeploy a vApp or Virtual Machine
Requestî ±toî ±undeployî ±aî ±vApp:
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"/>
Requestî ±toî ±undeployî ±aî ±Vm:
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
Aî ±powerOnî ±requestî ±toî ±aî ±vAppî ±URLî ±powersî ±onî ±allî ±ofî ±theî ±virtualî ±machinesî ±inî ±theî ±vApp,î ±asî ±specifiedî ±inî ±theî ±vApp’sî ±
ovf:StartupSectionî ±element.
Aî ±powerOnî ±requestî ±toî ±aî ±virtualî ±machineî ±URLî ±powersî ±onî ±theî ±specifiedî ±virtualî ±machineî ±andî ±forcesî ±deploymentî ±
ofî ±theî ±parentî ±vApp.