---
title: "Modify CPU of a Virtual Machine"
method: PUT
path: "/hardware/cpu/:rid"
tags: ["VM"]
---

# Modify CPU of a Virtual Machine

`PUT /hardware/cpu/:rid`

Modify the CPU configuration of a virtual machine

## Request body

- GithubComAlchemillahqSylveInternalInterfacesServicesLibvirtModifyCPURequest
  - `cpuCores` integer, required
  - `cpuPinning` GithubComAlchemillahqSylveInternalInterfacesServicesLibvirtCPUPinning[]
    - `cores` integer[], required
    - `socket` integer, required
  - `cpuSockets` integer, required
  - `cpuThreads` integer, required

## Response `200`

Success

- GithubComAlchemillahqSylveInternalAPIResponseAny
  - `data` unknown
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.net/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alchemillahq/sylve-api/versions/950e51f8af98/schema)
