vcenter vm hardware disk: get
Returns information about a virtual disk.
Request:
HTTP request
GET https://{server}/rest/vcenter/vm/{vm}/hardware/disk/{disk}
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
vm | string | Virtual machine identifier. |
disk | string | Virtual disk identifier. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"scsi" : {
"bus" : 1,
"unit" : 1
},
"nvme" : {
"bus" : 1,
"unit" : 1
},
"backing" : {
"vmdk_file" : "string",
"type" : "VMDK_FILE"
},
"label" : "string",
"ide" : {
"primary" : true,
"master" : true
},
"type" : "IDE",
"sata" : {
"bus" : 1,
"unit" : 1
},
"capacity" : 1
}
}
"value" : {
"scsi" : {
"bus" : 1,
"unit" : 1
},
"nvme" : {
"bus" : 1,
"unit" : 1
},
"backing" : {
"vmdk_file" : "string",
"type" : "VMDK_FILE"
},
"label" : "string",
"ide" : {
"primary" : true,
"master" : true
},
"type" : "IDE",
"sata" : {
"bus" : 1,
"unit" : 1
},
"capacity" : 1
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | info | Information about the specified virtual disk. |
value.label | string | Device label. |
value.type | string | Type of host bus adapter to which the device is attached. Defines the valid types of host bus adapters that may be used for attaching a virtual storage device to a virtual machine. Value is one of: IDE: Disk is attached to an IDE adapter. SCSI: Disk is attached to a SCSI adapter. SATA: Disk is attached to a SATA adapter. NVME: Disk is attached to a NVMe adapter. Warning: This constant is part of a new feature in development. It may be changed at any time and may not have all supported functionality implemented. |
value.ide | ide_address_info | Address of device attached to a virtual IDE adapter. Optional. It is only relevant when type has value IDE. Workaround for PR1459646. |
value.ide.primary | boolean | Flag specifying whether the device is attached to the primary or secondary IDE adapter of the virtual machine. |
value.ide.master | boolean | Flag specifying whether the device is the master or slave device on the IDE adapter. |
value.scsi | scsi_address_info | Address of device attached to a virtual SCSI adapter. Optional. It is only relevant when type has value SCSI. Workaround for PR1459646. |
value.scsi.bus | long | Bus number of the adapter to which the device is attached. |
value.scsi.unit | long | Unit number of the device. |
value.sata | sata_address_info | Address of device attached to a virtual SATA adapter. Optional. It is only relevant when type has value SATA. Workaround for PR1459646. |
value.sata.bus | long | Bus number of the adapter to which the device is attached. |
value.sata.unit | long | Unit number of the device. |
value.nvme | nvme_address_info | Address of device attached to a virtual NVMe adapter. 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. It is only relevant when type has value NVME. This field is optional and it is only relevant when the value of type is NVME. |
value.nvme.bus | long | Bus number of the adapter to which the device is attached. 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. |
value.nvme.unit | long | Unit number of the device. 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. |
value.backing | backing_info | Physical resource backing for the virtual disk. |
value.backing.type | string | Backing type for the virtual disk. Defines the valid backing types for a virtual disk. Value is one of: VMDK_FILE: Virtual disk is backed by a VMDK file. |
value.backing.vmdk_file | string | Path of the VMDK file backing the virtual disk. Optional. It is only relevant when type has value VMDK_FILE. This field is optional and it is only relevant when the value of type is VMDK_FILE. |
value.capacity | long | Capacity of the virtual disk in bytes. Optional. If unset, virtual disk is inaccessible or disk capacity is 0. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
404 | not_found | if the virtual machine or virtual disk is not found. |
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. |