---
title: "hv_vm_get_max_vcpu_count(_:)"
framework: hypervisor
role: symbol
role_heading: Function
path: "hypervisor/hv_vm_get_max_vcpu_count(_:)"
---

# hv_vm_get_max_vcpu_count(_:)

Returns the maximum number of vCPUs that the hypervisor supports.

## Declaration

```swift
func hv_vm_get_max_vcpu_count(_ max_vcpu_count: UnsafeMutablePointer<UInt32>) -> hv_return_t
```

## Parameters

- `max_vcpu_count`: The maximum number of vCPUs on output. Undefined if the call doesn’t succeed.

## Return Value

Return Value HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.

## See Also

### Creation and destruction

- [hv_vcpu_create(_:_:_:)](hypervisor/hv_vcpu_create(_:_:_:).md)
- [hv_vcpu_destroy(_:)](hypervisor/hv_vcpu_destroy(_:).md)
- [hv_vcpu_t](hypervisor/hv_vcpu_t.md)
