vcenter vm hardware adapter scsi: create

Adds a virtual SCSI adapter to the virtual machine.

Request:

HTTP request

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

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.

Request Body Structure:

{
    "spec"{
        "bus"1,
        "pci_slot_number"1,
        "sharing""NONE",
        "type""BUSLOGIC"
    }
}
<?xml version="1.0" ?>
<ns0:Create-Input xmlns:ns0="http://vmware.com/vcenter/vm/hardware/adapter/scsi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <spec>
    <pci_slot_number>1</pci_slot_number>
    <sharing>NONE</sharing>
    <bus>1</bus>
    <type>BUSLOGIC</type>
  </spec>
</ns0:Create-Input>

Request Body Parameters:

Name Type Description
bold = required
spec create_spec Specification for the new virtual SCSI adapter.
spec.type string Adapter type.

Optional. If unset, a guest-specific default value will be used.

spec.bus long SCSI bus number.

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 SCSI adapter on the PCI bus. If the PCI address is invalid, the server will change it when the VM is started or as the device is hot added.

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

spec.sharing string Bus sharing mode.

Optional. If unset, the adapter will default to NONE.

Response:

HTTP Status Code: 200

Representations:

{
    "value""obj-103"
}
<?xml version="1.0" ?>
<ns0:Create-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/adapter/scsi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>obj-103</value>
</ns0:Create-Result>

Response Type:

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

Errors:

HTTP Status Code Type Description
500 error if the system reported that the SCSI adapter was created but was unable to confirm the creation because the identifier of the new adapter could not be determined.
400 not_allowed_in_current_state if the virtual machine is suspended
404 not_found if the virtual machine is not found.
400 unable_to_allocate_resource if there are no more available SCSI buses on the virtual machine.
400 resource_in_use if the specified SCSI bus is in use.
400 invalid_argument if the specified SATA bus or PCI address is out of bounds.
400 resource_busy if the virtual machine is busy performing another operation.
400 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.