<!--
{
  "availability" : [
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZVirtualMachine/init(configuration:queue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZVirtualMachine(im)initWithConfiguration:queue:"
  },
  "title" : "init(configuration:queue:)"
}
-->

# init(configuration:queue:)

Creates and configures the VM with the specified data and dispatch queue.

```
init(configuration: VZVirtualMachineConfiguration, queue: dispatch_queue_t)
```

## Parameters

`configuration`

The configuration of the VM. The configuration must be valid, and you can verify that it’s valid by calling its [`validate()`](/documentation/Virtualization/VZVirtualMachineConfiguration/validate()) method. The VM stores a copy of the configuration.

`queue`

The serial dispatch queue for the VM. You must perform all VM-related operations on the specified queue, and the VM executes callbacks and delegate methods on the queue. If the queue isn’t serial, the behavior isn’t defined.

## Return Value

An initialized VM object.

## Discussion

---

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)