---
title: cpuCount
framework: virtualization
role: symbol
role_heading: Instance Property
path: virtualization/vzvirtualmachineconfiguration/cpucount
---

# cpuCount

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

## Declaration

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

## Discussion

Discussion The value of this property must be greater than or equal to the value in minimumAllowedCPUCount, and less than or equal to the value in maximumAllowedCPUCount. The system uses the number of physical CPUs on the current system to determine a default value.

## See Also

### Setting the number of CPUs

- [minimumAllowedCPUCount](virtualization/vzvirtualmachineconfiguration/minimumallowedcpucount.md)
- [maximumAllowedCPUCount](virtualization/vzvirtualmachineconfiguration/maximumallowedcpucount.md)
