Bước 1: Chuẩn bị thông tin
Đăng nhập vào IAM portal -> vCD portal : thu thập thông tin
- {{vm-uuid}}: Chọn VM -> xem vm uuid trên url
-{{Bearer Token}}: Vui lòng tham khảo tài liệu "API đăng nhập bằng Token "
Bước 2: Lấy thông tin bộ nhớ của VM
GET https://{{vcd_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/memory
Authorization: {{Bearer Token}}
- ‘Accept’: */*;version=37.2
- ‘Content-type’: application/vnd.vmware.vcloud.rasdItem+xml
Copy Response Body
Bước 3: Cấu hình lại bộ nhớ của VM
PUT https://{{vcd_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/memory
Authorization: {{Bearer Token }}
-'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:
Copy
<?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> ==============================================================================
Tìm dòng “<rasd:VirtualQuantity>2048</rasd:VirtualQuantity> ” và chỉnh sửa giá trị, đây là bộ nhớ của VM (MB). Lưu ý rằng giá trị phải là bội số của 4 MB.
Bước 4: Xác minh
Lấy thông tin bộ nhớ của VM
GET https://{{vcd_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/memory
Đăng nhập IAM -> vCD portal -> chọn VM -> Compute