<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Hypervisor",
  "identifier" : "/documentation/Hypervisor/hv_vm_create(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Hypervisor"
    ],
    "preciseIdentifier" : "c:@F@hv_vm_create"
  },
  "title" : "hv_vm_create(_:)"
}
-->

# hv_vm_create(_:)

Creates a VM instance for the current process.

```
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

[`HV_SUCCESS`](/documentation/Hypervisor/HV_SUCCESS) if the operation was successful, otherwise an error code specified in [`hv_return_t`](/documentation/Hypervisor/hv_return_t).

## Discussion

Intel-based Mac computers have different parameters:

- `flags`: Reserved. Pass [`HV_VM_DEFAULT`](/documentation/Hypervisor/HV_VM_DEFAULT) to this argument.

---

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)