---
title: "customVirtioConfiguration(_:didCreateDevice:)"
framework: virtualization
role: symbol
role_heading: Instance Method
path: "virtualization/vzcustomvirtiodeviceconfigurationdelegate/customvirtioconfiguration(_:didcreatedevice:)"
---

# customVirtioConfiguration(_:didCreateDevice:)

A method the framework calls when it creates a custom Virtio device from a custom Virtio device configuration.

## Declaration

```swift
optional func customVirtioConfiguration(_ deviceConfiguration: VZCustomVirtioDeviceConfiguration, didCreateDevice device: VZCustomVirtioDevice)
```

## Parameters

- `deviceConfiguration`: The configuration calling the delegate method.
- `device`: The doc://com.apple.virtualization/documentation/Virtualization/VZCustomVirtioDevice that the framework created.

## Discussion

Discussion The Virtualization framework creates a VZCustomVirtioDevice when you call init(configuration:) and calls this method on the serial queue of the guest’s VZVirtualMachine instance.
