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

# init(configuration:)

Creates the VM and configures it with the specified data.

## Declaration

```swift
convenience init(configuration: VZVirtualMachineConfiguration)
```

## 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.

## Return Value

Return Value An initialized VM object.

## Discussion

Discussion This VM uses your app’s main queue for all operations. You must perform all VM-related operations on the main queue, and the VM executes all callbacks and delegate methods on the main queue.

## See Also

### Creating the VM

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