Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

  • {{vcd_url}}

Image Added

...

Step 2:

...

  • {{vdc_uuid}}: Login vCD portal -> select

...

  • VDC-> take a look and note vdc_uuid on the

...

  • URL

Image Added

Step 3:

  • {{network_uuid}}: On the vCD portal -> Networking -> Networks -> New

*** Note that the network name must be “VM Network”

...

Note

...

Image Removed

- {{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

...

Image Removed

-{{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>

Image Removed

SEND request.

3. Verify

...

Attention: the vCD -> Data Center -> select

...

Virtual Data Center -

...

>vApps -> check your vApp and VM

End.