> 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/compute/4.-hi-gio-api/api-reconfigures-vms-cpu.md).

# API reconfigures VM's CPU

## <mark style="color:green;">**Overview**</mark> <a href="#overview" id="overview"></a>

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

## <mark style="color:green;">**Procedure**</mark> <a href="#procedure" id="procedure"></a>

{% stepper %}
{% step %}

#### **Step 1: Prepare Information**

Login IAM portal -> vCD portal: collect the information

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

  <figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2Fdl7rXCABDh8zrgDD6fzp%2Fimage.png?alt=media&amp;token=1bc8462c-f34f-4cf9-a738-dce4741a9da5" alt=""><figcaption></figcaption></figure>
* **{{vm-uuid}}:** select VM -> take a look vm uuid on url<br>

  <figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FytZN9EfWEI3MFQeLZHMD%2Fimage.png?alt=media&amp;token=99c997d1-e8e9-4eab-bd34-9f05cfec0bd6" alt=""><figcaption></figcaption></figure>
* **{{Bearer Token}}:** Please follow **“Api token login”** document
  {% endstep %}

{% step %}

#### **Step 2: Get VM’s CPU information**

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

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

\- ‘Content-type’: application/vnd.vmware.vcloud.rasdItem+xml<br>

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FyoBCGMIms6zFL1izz2Kx%2Fimage.png?alt=media&amp;token=f5990841-9a6d-46ef-974a-57be72368ba5" alt=""><figcaption></figcaption></figure>

* SEND request.

Copy **Response Body**
{% endstep %}

{% step %}
**Step 3: Reconfigure VM’s CPU**

**Postman:**

* PUT https\://{{vcd\_url}}/api/vApp/{{vm-uuid}}/virtualHardwareSection/cpu
* 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 CPU 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"
    <rasd:Reservation>0</rasd:Reservation>
    <rasd:ResourceSubType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <rasd:ResourceType>3</rasd:ResourceType>
…………………………………………………………………………..
………………………………………………………………………….
    <rasd:VirtualQuantity>8</rasd:VirtualQuantity>
    <rasd:VirtualQuantityUnits xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <rasd:Weight>0</rasd:Weight>
    <vmw:CoresPerSocket ovf:required="false">2</vmw:CoresPerSocket>
type="application/vnd.vmware.vcloud.rasdItem+json"/>
</ns4:Item>
```

\==============================================================================

Find line “<mark style="color:blue;">\<rasd:VirtualQuantity>8\</rasd:VirtualQuantity></mark>” and edit the number, it’s the CPU number.<br>

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FM8YhytGcKc4qSJkT36le%2Fimage.png?alt=media&amp;token=ae71144b-fead-47e6-88b4-b4cda31d9150" alt=""><figcaption></figcaption></figure>

* SEND request.
  {% endstep %}

{% step %}

#### **Step 4: Verify**

* **Get VM’s CPU information**

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

* **Check on vCD portal**

Login IAM -> vCD portal-> select VM-> Compute
{% 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/compute/4.-hi-gio-api/api-reconfigures-vms-cpu.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.
