> For the complete documentation index, see [llms.txt](https://docs.higiocloud.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.higiocloud.vn/hi-gio-user-guide-vn/compute/4.-hi-gio-api/api-cau-hinh-lai-disk-cua-vm.md).

# API cấu hình lại Disk của VM

## <mark style="color:green;">**Tổng quan**</mark>

Trong hướng dẫn này, bạn sẽ tìm thấy thông tin chi tiết về cách chuẩn bị thông tin, lấy thông tin đĩa của VM và cấu hình lại đĩa của VM.

## <mark style="color:green;">Quy trình</mark>

{% stepper %}
{% step %}
**Bước 1:** Chuẩn bị thông tin

Đăng nhập vào IAM portal -> vCD portal: thu thập thông tin

**{{vcd\_url}}**<br>

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/YVf7Zs5G5QKOlfzerjLf/image.png" alt=""><figcaption></figcaption></figure>

&#x20;**{{vm-uuid}}:** chọn VM -> kiểm tra vm uuid trên URL<br>

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/ulDNVwN55qefel64W5Mx/image.png" alt=""><figcaption></figcaption></figure>

**{{Bearer Token}}:** Vui lòng tham khảo tài liệu “API đăng nhập bằng Token”.
{% endstep %}

{% step %}
**Bước 2**: Lấy thông tin đĩa của VM

* GET **https\://{{vcd\_url}}APIi/vApp/{{vm-uuid}}/virtualHardwareSection/disks**
* Authorization: {{Bearer Token}}
* Headers:

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

\- ‘Content-type’: application/vnd.vmware.vcloud.rasdItem+xml
{% endstep %}

{% step %}
**Bước 3:** Cấu hình lại đĩa của VM

* PUT https//{{vcd\_url}}APIi/vApp/{{vm-uuid}}/virtualHardwareSection/disks
* 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 disk information }}*

Ex:

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RasdItemsList xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
…………………………………………….
………………………………………
        <rasd:HostResource xmlns:ns10="http://www.vmware.com/vcloud/v1.5" ns10:storageProfileHref="https://iaas-hcmc02.higiocloud.vn/api/vdcStorageProfile/a7c6c2f7-3c2211e6e7b0" ns10:busType="6" ns10:busSubType="VirtualSCSI" ns10:capacity="15240" ns10:iops="4000" ns10:storageProfileOverrideVmDefault="false"></rasd:HostResource>
        <rasd:InstanceID>2000</rasd:InstanceID>
        <rasd:Limit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
        <rasd:MappingBehavior xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
        <rasd:OtherResourceType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
        <rasd:Parent>2</rasd:Parent>
    </Item>
</RasdItemsList>

```

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/EUnY8a1I3acEX3dSd1XG/image.png" alt=""><figcaption></figcaption></figure>

* Tìm từ <mark style="color:red;">ns10:capacity</mark> và chỉnh sửa giá trị của nó (đơn vị MB).
* SEND request.
  {% endstep %}

{% step %}
**Bước 4:** Xác minh

* **Lấy thông tin đĩa của VM**

GET https\://{{vcd\_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/disks

* **Kiểm tra trên vCD portal:**

Đăng nhập IAM -> vCD portal -> chọn VM -> Hard disk

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.higiocloud.vn/hi-gio-user-guide-vn/compute/4.-hi-gio-api/api-cau-hinh-lai-disk-cua-vm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
