vcenter vm hardware cpu: get

Returns the CPU-related settings of a virtual machine.

Request:

HTTP request

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

Path Parameters

Name Type Description
Required
vm string Virtual machine identifier.

Response:

HTTP Status Code: 200

Representations:

{
    "value"{
        "cores_per_socket"1,
        "count"1,
        "hot_add_enabled"true,
        "hot_remove_enabled"true
    }
}
<?xml version="1.0" ?>
<ns0:Get-Result xmlns:ns0="http://vmware.com/vcenter/vm/hardware/cpu" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <value>
    <count>1</count>
    <hot_remove_enabled>true</hot_remove_enabled>
    <hot_add_enabled>true</hot_add_enabled>
    <cores_per_socket>1</cores_per_socket>
  </value>
</ns0:Get-Result>

Response Type:

Name Type Description
bold = required
value info CPU-related settings of the virtual machine.
value.count long Number of CPU cores.

value.cores_per_socket long Number of CPU cores per socket.

value.hot_add_enabled boolean Flag indicating whether adding CPUs while the virtual machine is running is enabled.

value.hot_remove_enabled boolean Flag indicating whether removing CPUs while the virtual machine is running is enabled.

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.