Get Hardware Disk
Returns information about a virtual disk.
Request
URLURL
Path Parameters
Path Parameters
Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
Virtual disk identifier. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Authentication
Response
Response BodyResponse Body
Information about the specified virtual disk.
{
"backing": {
"type": "VMDK_FILE",
"vmdk_file": "string"
},
"capacity": 0,
"ide": {
"master": false,
"primary": false
},
"label": "string",
"nvme": {
"bus": 0,
"unit": 0
},
"sata": {
"bus": 0,
"unit": 0
},
"scsi": {
"bus": 0,
"unit": 0
},
"type": "IDE"
}
The Disk.HostBusAdapterType enumerated type defines the valid types of host bus adapters that may be used for attaching a virtual storage device to a virtual machine.
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.
Possible values are: IDE , SCSI , SATA , NVME
Device label.
Address of device attached to a virtual IDE adapter. Workaround for PR1459646
Address of device attached to a virtual NVMe adapter. This field is optional and it is only relevant when the value of Disk.Info.type is NVME.
Address of device attached to a virtual SATA adapter. Workaround for PR1459646
Address of device attached to a virtual SCSI adapter. Workaround for PR1459646
Capacity of the virtual disk in bytes. If unset, virtual disk is inaccessible or disk capacity is 0.
Errors
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.not_found : if the virtual machine or virtual disk is not found.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.resource_inaccessible : if the virtual machine’s configuration state cannot be accessed.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: get
x-vmw-doc-deprecated-path: /rest/vcenter/vm/{vm}/hardware/disk/{disk}
x-vmw-doc-operation: get