<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZVirtualMachineConfiguration/cpuCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZVirtualMachineConfiguration(py)CPUCount"
  },
  "title" : "cpuCount"
}
-->

# cpuCount

The number of CPUs you make available to the guest operating system.

```
var cpuCount: Int { get set }
```

## Discussion

The value of this property must be greater than or equal to the value in [`minimumAllowedCPUCount`](/documentation/Virtualization/VZVirtualMachineConfiguration/minimumAllowedCPUCount), and less than or equal to the value in [`maximumAllowedCPUCount`](/documentation/Virtualization/VZVirtualMachineConfiguration/maximumAllowedCPUCount). The system uses the number of physical CPUs on the current system to determine a default value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)