REST API - create

vcenter vm hardware adapter nvme: create

Adds a virtual NVMe adapter to the virtual machine. Warning: This operation is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Request:

HTTP request

POST https://{server}/rest/vcenter/vm/{vm}/hardware/adapter/nvme

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.

Request Body Structure:

{
    "spec"{
        "bus"1,
        "pci_slot_number"1
    }
}

Request Body Parameters:

Name Type Description
bold = required
spec create_spec Specification for the new virtual NVMe adapter.
spec.bus long NVMe bus number. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. If unset, the server will choose an available bus number; if none is available, the request will fail.

spec.pci_slot_number long Address of the NVMe adapter on the PCI bus. Warning: This attribute is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented.

Optional. If unset, the server will choose an available address when the virtual machine is powered on.

Response:

HTTP Status Code: 200

Representation:

{
    "value""obj-103"
}

Response Type:

Name Type Description
bold = required
value string Virtual NVMe adapter identifier.

Errors:

HTTP Status Code Type Description
500 error if the system reports an error while responding to the request.
400 not_allowed_in_current_state if the virtual machine is suspended
404 not_found if the virtual machine is not found.
500 unable_to_allocate_resource if there are no more available NVMe buses on the virtual machine.
400 resource_in_use if the specified NVMe bus or PCI address is in use.
400 invalid_argument if the specified NVMe bus or PCI address is out of bounds.
500 resource_busy if the virtual machine is busy performing another operation.
500 resource_inaccessible if the virtual machine's configuration state cannot be accessed.
503 service_unavailable if the system is unable to communicate with a service to complete the request.
401 unauthenticated if the user can not be authenticated.
403 unauthorized if the user doesn't have the required privileges.
400 unsupported if the guest operating system of the virtual machine is not supported and spec includes unset fields that default to guest-specific values.