Api create VM from template
*Main steps:
- Preparation
- Create VM from template
...
Overview
In this manual, you will find detailed information on how to prepare & create a VM from the template.
This API creates a VM with the default name (VM name of template), default network
...
"VM Network," and default compute and storage.
Procedure
Expand |
---|
1. Preparation
...
Step 1: Log in to IAM portal -> vCD portal: collect the information |
...
|
...
Step 2: |
...
|
...
|
...
Step 3:
|
*** Note that the network name must be “VM Network”
...
|
...
- {{vappTemplate_uuid}}: On the vCD portal -> Content Hub -> Catalogs ->HIGIO Shared Catalogs
...
-> vApp Templates -> select the template that you want to create VM -> take a look the vappTemplate_uuid on the url
...
-{{Bearer Token}}: Please follow “Api token login” document
2. Create VM from template
Postman:
...
Authorization: {{Bearer Token }}
Headers:
- 'Accept: */*;version=37.2
- ‘Content-type’: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml; charset=ISO-8859-1
...
Body: {{select raw, copy, paste and edit the code below}}
...
<vcloud:InstantiateVAppTemplateParams
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
deploy="false"
name="your vapp name"
powerOn="false">
<vcloud:Description>VApp Description</vcloud:Description>
<vcloud:InstantiationParams>
<vcloud:NetworkConfigSection>
<ovf:Info>NetInfo</ovf:Info>
...
<vcloud:Configuration>
<vcloud:ParentNetwork
href="https:// {{vcd_url}}/api/network/{{network_uuid}}"
name="VM Network"
type="application/vnd.vmware.vcloud.network+xml"/>
<vcloud:FenceMode>bridged</vcloud:FenceMode>
</vcloud:Configuration>
</vcloud:NetworkConfig>
</vcloud:NetworkConfigSection>
</vcloud:InstantiationParams>
<vcloud:Source
href="https://{{vcd_url}}/api/vAppTemplate/{{vappTemplate_uuid}}"
name="HIGIO"
type="application/vnd.vmware.vcloud.vAppTemplate+xml"/>
</vcloud:InstantiateVAppTemplateParams>
SEND request.
3. Verify
...
|
...
|
...
|
End.