v1

latestOpenAPI 3.0.1Apache 2.02026-07-17304456.7 KB

Add a new disk to the VM

put/vm.add-disk

Request body

pathstring
readonlyboolean
directboolean
iommuboolean
num_queuesinteger
queue_sizeinteger
vhost_userboolean
vhost_socketstring
pci_segmentinteger
idstring
serialstring
rate_limit_groupstring
backing_filesboolean
sparseboolean
image_type'FixedVhd' | 'Qcow2' | 'Raw' | 'Vhdx' | 'Unknown'

Example request

{
  "num_queues": 9,
  "rate_limit_group": "rate_limit_group",
  "queue_size": 6,
  "direct": false,
  "backing_files": false,
  "rate_limiter_config": {
    "ops": {
      "size": 0,
      "one_time_burst": 0,
      "refill_time": 0
    },
    "bandwidth": {
      "size": 0,
      "one_time_burst": 0,
      "refill_time": 0
    }
  },
  "queue_affinity": [
    {
      "host_cpus": [
        6,
        6
      ],
      "queue_index": 9
    },
    {
      "host_cpus": [
        6,
        6
      ],
      "queue_index": 9
    }
  ],
  "pci_segment": 8,
  "path": "path",
  "readonly": false,
  "iommu": false,
  "vhost_socket": "vhost_socket",
  "serial": "serial",
  "sparse": true,
  "vhost_user": false,
  "id": "id",
  "image_type": "FixedVhd"
}

Response

The new disk was successfully added to the VM instance.

idstring required
bdfstring required

Example response

{
  "bdf": "bdf",
  "id": "id"
}