---
title: VZCustomVirtioDevice
framework: virtualization
role: symbol
role_heading: Class
path: virtualization/vzcustomvirtiodevice
---

# VZCustomVirtioDevice

An interface that represents a custom Virtio device that you provide the implementation for.

## Declaration

```swift
class VZCustomVirtioDevice
```

## Overview

Overview A Virtio device is a virtual emulated device the framework exposes to the guest OS following the Virtio standard. For more information about the Virtio standard, see the Virtio specification. A VZCustomVirtioDevice allows you to define, configure, and provide your own implementation for a device that uses the Virtio protocol. To define a VZCustomVirtioDevice create and configure a VZCustomVirtioDeviceConfiguration object. Once configured, the framework creates a VZCustomVirtioDevice object and returns it through the invocation of the delegate’s customVirtioConfiguration(_:didCreateDevice:) method. Implement a class that conforms to the VZCustomVirtioDeviceDelegate protocol to provide an implementation for the device. The Virtualization framework performs all operations on the VZCustomVirtioDevice and VZCustomVirtioDeviceDelegate through a serial queue that you can configure through the deviceQueue property. If the queue isn’t set, the framework performs all operations on the queue in the VM’s VZVirtualMachine queue property by default.

## Topics

### Instance Properties

- [delegate](virtualization/vzcustomvirtiodevice/delegate.md)
- [deviceQueue](virtualization/vzcustomvirtiodevice/devicequeue.md)
- [negotiatedFeatures](virtualization/vzcustomvirtiodevice/negotiatedfeatures.md)
- [sharedMemoryRegions](virtualization/vzcustomvirtiodevice/sharedmemoryregions.md)

### Instance Methods

- [guestMemoryMapping(atPhysicalAddress:length:)](virtualization/vzcustomvirtiodevice/guestmemorymapping(atphysicaladdress:length:).md)
- [queue(at:)](virtualization/vzcustomvirtiodevice/queue(at:).md)
- [requestReset()](virtualization/vzcustomvirtiodevice/requestreset().md)
- [update(_:completionHandler:)](virtualization/vzcustomvirtiodevice/update(_:completionhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Related Documentation

- [VZCustomVirtioDeviceConfiguration](virtualization/vzcustomvirtiodeviceconfiguration.md)
- [VZCustomVirtioDeviceConfigurationDelegate](virtualization/vzcustomvirtiodeviceconfigurationdelegate.md)
- [VZCustomVirtioDeviceDelegate](virtualization/vzcustomvirtiodevicedelegate.md)
- [VZVirtioQueue](virtualization/vzvirtioqueue.md)
- [VZVirtioSharedMemoryRegion](virtualization/vzvirtiosharedmemoryregion.md)

### Creating and configuring Virtio drivers

- [VZCustomVirtioDeviceConfiguration](virtualization/vzcustomvirtiodeviceconfiguration.md)
- [VZVirtioDeviceSpecificConfiguration](virtualization/vzvirtiodevicespecificconfiguration.md)
