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

# hv_vm_create(_:)

Creates a VM instance for the current process.

## Declaration

```swift
func hv_vm_create(_ config: hv_vm_config_t?) -> hv_return_t
```

## Parameters

- `config`: The configuration of the vCPU, which must be nil. Apple silicon only.

## Return Value

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

## Discussion

Discussion Intel-based Mac computers have different parameters:

## See Also

### Virtual machine management

- [hv_vm_config_create()](hypervisor/hv_vm_config_create().md)
- [hv_vm_destroy()](hypervisor/hv_vm_destroy().md)
- [OS_hv_vm_config](hypervisor/os_hv_vm_config.md)
- [hv_vm_config_t](hypervisor/hv_vm_config_t.md)
