Update CPU Configuration operation
The Update CPU Configuration operation modifies the CPU configuration of the specified virtual machine. This operation can modify the CPU configuration of a virtual machine, even when the virtual machine is in the Power On or Suspended state.
If the <status> response element contains success, the <Task> response element contains the ID of the queued task, which you can use to obtain the task status.
The following table describes the elements for this request.
Adapter request elements for the Update CPU Configuration operation
Element | Definition | Required |
---|---|---|
<operation-type> | Defines the type of the operation: Configure_Vm | Yes |
<operation-name> | Defines the name of the operation: Update_CPU_Configuration | Yes |
<soap-url> | Specifies the URL for the remote SOAP service running on the VMware VirtualCenter | No |
<transport> | Specifies the transport protocol for the message | No |
<user-name> | Specifies the user name that is used for HTTP basic authentication on the VMware Virtual Center | No |
<password> | Specifies the password corresponding to <user-name> | Conditional; required if <user-name> is specified |
<parameters> | Contains the elements required to execute the operation | Yes |
<virtual-machine> | Contains the name of the virtual machine for which you to update the CPU configuration | Yes |
<num-cpus> | The number of virtual processors in a virtual machine | No |
<num-cores-per-socket> | Specifies the number of cores among which you distribute virtual CPUs in the virtual machine
| No |
<cpu-hot-add-enabled> | Indicates whether virtual processors can be added to the virtual machine while it is running | No |
<cpu-hot-remove-enabled> | Indicates whether virtual processors can be removed from the virtual machine while it is running | No |
<cpu-allocation> | Specifies the resource limits for the CPU | No |
The following code sample shows a sample adapter request for the Update CPU Configuration operation.
Sample adapter request for the Update CPU Configuration operation
<operation-type>Configure_Vm</operation-type>
<operation-name>Update_CPU_Configuration</operation-name>
<soap-url></soap-url>
<transport></transport>
<user-name></user-name>
<password></password>
<parameters>
<virtual-machine>winSix</virtual-machine>
<spec>
<num-cpus>4</num-cpus>
<num-cores-per-socket>2</num-cores-per-socket>
<cpu-hot-add-enabled>true</cpu-hot-add-enabled>
<cpu-hot-remove-enabled>true</cpu-hot-remove-enabled>
<cpu-allocation>
<reservation>256</reservation>
<limit>256</limit>
<shares>
<shares>512</shares>
<level>custom</level>
</shares>
</cpu-allocation>
</spec>
</parameters>
</vmware-infrastructure-request>
The following code sample shows the response for the sample Update CPU Configuration operation.
Sample adapter response for the Update CPU Configuration operation
<metadata>
<status>success</status>
</metadata>
<UpdateCPUConfigurationResponse>
<Task>task-727</Task>
</UpdateCPUConfigurationResponse>
</vmware-infrastructure-response>
The following table describes the response elements.
Adapter response element for the Update CPU Configuration operation
Element | Definition |
---|---|
<Task> | Specifies the task ID of the submitted task |