1. Types
2. vcenter
3. vm
4. hardware
5. cpu

## vcenter vm hardware cpu: update spec

The `update_spec` structure describes the updates to be made to the CPU-related settings of a virtual machine.

### Representations:

- JSON
- XML

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

#### Attributes:

Name | Type | Description
--- | --- | ---
Optional
count | long | New number of CPU cores. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. The supported range of CPU counts is constrained by the configured guest operating system and virtual hardware version of the virtual machine. If the virtual machine is running, the number of CPU cores may only be increased if vcenter.vm.hardware.cpu.info.hot_add_enabled is true, and may only be decreased if vcenter.vm.hardware.cpu.info.hot_remove_enabled is true. Optional. If unset, the value is unchanged.
cores_per_socket | long | New number of CPU cores per socket. The number of CPU cores in the virtual machine must be a multiple of the number of cores per socket. Optional. If unset, the value is unchanged.
hot_add_enabled | boolean | Flag indicating whether adding CPUs while the virtual machine is running is enabled. This field may only be modified if the virtual machine is powered off. Optional. If unset, the value is unchanged.
hot_remove_enabled | boolean | Flag indicating whether removing CPUs while the virtual machine is running is enabled. This field may only be modified if the virtual machine is powered off. Optional. If unset, the value is unchanged.