---
title: "init(configuration:queue:)"
framework: virtualization
role: symbol
role_heading: Initializer
path: "virtualization/vzvirtualmachine/init(configuration:queue:)"
---

# init(configuration:queue:)

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

## Declaration

```swift
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 doc://com.apple.virtualization/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

Return Value An initialized VM object.

## See Also

### Creating the VM

- [init(configuration:)](virtualization/vzvirtualmachine/init(configuration:).md)
- [isSupported](virtualization/vzvirtualmachine/issupported.md)
