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

Representations:

{
    "value"{
        "backing"{
            "type""VMDK_FILE",
            "vmdk_file""string"
        },
        "capacity"1,
        "ide"{
            "master"true,
            "primary"true
        },
        "label""string",
        "sata"{
            "bus"1,
            "unit"1
        },
        "scsi"{
            "bus"1,
            "unit"1
        },
        "type""IDE"
    }
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/disk" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <scsi>
      <unit>1</unit>
      <bus>1</bus>
    </scsi>
    <ide>
      <primary>true</primary>
      <master>true</master>
    </ide>
    <sata>
      <unit>1</unit>
      <bus>1</bus>
    </sata>
    <capacity>1</capacity>
    <label>string</label>
    <type>IDE</type>
    <backing>
      <vmdk_file>string</vmdk_file>
      <type>VMDK_FILE</type>
    </backing>
  </value>
</ns0:Get-Result>

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.

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.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.
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.