CPU and Memory Information The VirtualMachineConfigSpec data object allows you to specify CPU and memory configuration. CPU and Memory Resource AllocationTo allocate resources, use the cpuAllocation and memoryAllocation properties of VirtualMachineConfigSpec. Both properties contain ResourceAllocationInfo objects with the following properties: CPU and Memory Modification for Running Virtual MachinesSet CpuHotAddEnabled and CpuHotRemoveEnabled to specify whether virtual processors can be added to or removed from a virtual machine while the virtual machine is running. Set MemoryHotAddEnabled to specify whether memory can be added while the virtual machine is running. Number of CPUsYou can set the number of virtual processors for the virtual machine with the VirtualMachineConfigSpec.numCPUs property. Legal values for this property change depending on the guestosid value you specify. CPU Processors and Memory AffinityIf your virtual machine is on an ESXi system, and if you have a license that supports Symmetric Multiprocessors (SMP), you can configure the virtual machine to have multiple virtual CPUs by setting cpuAffinity and memoryAffinity. You define a set of integers that represents the processors (for CPU) and NUMA nodes (for memory). If you are reconfiguring the affinity setting and leave the array empty, any existing affinity is removed. See the Resource Management Guide for a discussion of NUMA nodes and affinity. CPU FeaturesYou can use the VirtualMachineConfigSpec.cpuFeatureMask[].info property to represent the CPU features requirements for a virtual machine or guest operating system. See the HostCpuIdInfo data object discussion in the API Reference for a detailed discussion. Parent topic: Configuring a Virtual Machine