vcenter vm hardware: get

Returns the virtual hardware settings of a virtual machine.

Request:

HTTP request

GET https://{server}/rest/vcenter/vm/{vm}/hardware

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.

Response:

HTTP Status Code: 200

Representation:

{
    "value"{
        "upgrade_error"{},
        "upgrade_policy""NEVER",
        "upgrade_status""NONE",
        "upgrade_version""VMX_03",
        "version""VMX_03"
    }
}

Response Type:

Name Type Description
bold = required
value info Virtual hardware settings of the virtual machine.
value.version string Virtual hardware version.

Defines the valid virtual hardware versions for a virtual machine. Value is one of:
VMX_03: Hardware version 3.
VMX_04: Hardware version 4.
VMX_06: Hardware version 6.
VMX_07: Hardware version 7.
VMX_08: Hardware version 8.
VMX_09: Hardware version 9.
VMX_10: Hardware version 10.
VMX_11: Hardware version 11.
VMX_12: Hardware version 12.
VMX_13: Hardware version 13.
VMX_14: Hardware version 14. This constant was added in vSphere API 6.7

value.upgrade_policy string Scheduled upgrade policy.

Defines the valid virtual hardware upgrade policies for a virtual machine. Value is one of:
NEVER: Do not upgrade the virtual machine when it is powered on.
AFTER_CLEAN_SHUTDOWN: Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
ALWAYS: Run scheduled upgrade when the virtual machine is powered on.

value.upgrade_version string Target hardware version to be used on the next scheduled virtual hardware upgrade.

Defines the valid virtual hardware versions for a virtual machine. Value is one of:
VMX_03: Hardware version 3.
VMX_04: Hardware version 4.
VMX_06: Hardware version 6.
VMX_07: Hardware version 7.
VMX_08: Hardware version 8.
VMX_09: Hardware version 9.
VMX_10: Hardware version 10.
VMX_11: Hardware version 11.
VMX_12: Hardware version 12.
VMX_13: Hardware version 13.
VMX_14: Hardware version 14. This constant was added in vSphere API 6.7Optional. It is only relevant when upgrade_policy has value [AFTER_CLEAN_SHUTDOWN, ALWAYS]. This field is optional and it is only relevant when the value of upgrade_policy is one of AFTER_CLEAN_SHUTDOWN or ALWAYS.

value.upgrade_status string Scheduled upgrade status.

Defines the valid virtual hardware upgrade statuses for a virtual machine. Value is one of:
NONE: No scheduled upgrade has been attempted.
PENDING: Upgrade is scheduled but has not yet been run.
SUCCESS: The most recent scheduled upgrade was successful.
FAILED: The most recent scheduled upgrade was not successful.

value.upgrade_error exception Reason for the scheduled upgrade failure.

Optional. It is only relevant when upgrade_status has value FAILED. This field is optional and it is only relevant when the value of upgrade_status is FAILED.

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