/
API reconfigures VM's Memory

API reconfigures VM's Memory

Overview

In this manual, you will find detailed information on how to prepare information, get the VM’s memory information, and reconfigure the VM’s memory.

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

2. Get VM’s memory information

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

  • Authorization: {{Bearer Token}}

  • Headers:

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

- ‘Content-type’: application/vnd.vmware.vcloud.rasdItem+xml

  • SEND request.

Copy Response Body

3. Reconfig VM’s memory

  • PUT https://{{vcd_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/memory

  • Authorization: {{Bearer Token }}

  • Headers:

- 'Accept: */*;version=37.2

- ‘Content-type’: application/vnd.vmware.vcloud.rasdItem+xml

Body: {{select raw -> copy and paste response body from Get VM’s memory information }}

Ex:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ns4:Item xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:ns4="http://www.vmware.com/vcloud/v1.5" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:vmw="http://www.vmware.com/schema/ovf"

………………………………………………………….

……………………………………………………………

    <rasd:ResourceType>4</rasd:ResourceType>

    <rasdraidtualQuantity>2048</rasd:VirtualQuantity>

    <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>

type="application/vnd.vmware.vcloud.rasdItem+json"/>

</ns4:Item>

==============================================================================

 

Find line “<rasd:VirtualQuantity>2048</rasd:VirtualQuantity>” and edit the value, it’s the VM’s memory (MB).Please note that Value must be a multiple of 4 MB

  • SEND request.

Step 4: Verify

  • Get VM’s memory information

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

  • Check on vCD portal

Login IAM -> vCD portal-> select VM-> Compute

End.

Related content

API reconfigures VM's CPU
API reconfigures VM's CPU
More like this
API reconfigures VM's Disk
API reconfigures VM's Disk
More like this
API reconfigures VM's Networks
API reconfigures VM's Networks
More like this
API creates VM from Template
API creates VM from Template
Read with this
4. HI GIO API
Read with this
API power on/off VM
API power on/off VM
Read with this