---
title: "Add a new vsock device to the VM"
method: PUT
path: "/vm.add-vsock"
---

# Add a new vsock device to the VM

`PUT /vm.add-vsock`

## Request body

- VsockConfig
  - `cid` integer, required — Guest Vsock CID
  - `socket` string, required — Path to UNIX domain socket, used to proxy vsock connections.
  - `iommu` boolean
  - `pci_segment` integer
  - `id` string

## Response `200`

The new device was successfully added to the VM instance.

- PciDeviceInfo — Information about a PCI device
  - `id` string, required
  - `bdf` string, required

## Other responses

- `204` — The new device was successfully (cold) added to the VM instance.
- `500` — The new device could not be added to the VM instance.

---

[API](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api.md) · [All operations](https://skmtc.dev/kata-containers/apis/cloud-hypervisor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kata-containers/cloud-hypervisor-api/revisions/c30c01a9fb80/schema)
