<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZVirtioQueue",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZVirtioQueue"
  },
  "title" : "VZVirtioQueue"
}
-->

# VZVirtioQueue

A Virtio queue.

```
class VZVirtioQueue
```

## Overview

A `VZVirtioQueue` represents a virtqueue (Virtio queue) that belongs to a Virtio device. A virtqueue provides a mechanism for
bulk data transport on Virtio devices, that facilitate device operations. For more information about how virtqueues work, see the
[Virtio specification](https://docs.oasis-open.org/virtio/virtio/v1.3/csd01/virtio-v1.3-csd01.html).

Don’t instantiate `VZVirtioQueue` objects directly. Once you have created and configured a [`VZCustomVirtioDevice`](/documentation/Virtualization/VZCustomVirtioDevice),
you can access the Virtio queues belonging to that device through the [`queue(at:)`](/documentation/Virtualization/VZCustomVirtioDevice/queue(at:)) method.

When the device receives a notification from the guest, the framework provides the queue with which the framework associates the notification as an
argument when the framework calls [`customVirtioDevice(_:didReceiveNotificationFor:)`](/documentation/Virtualization/VZCustomVirtioDeviceDelegate/customVirtioDevice(_:didReceiveNotificationFor:)).

## Topics

### Instance Properties

[`var queueIndex: UInt16`](/documentation/Virtualization/VZVirtioQueue/queueIndex)

The index for this queue.

[`var queueSize: UInt16`](/documentation/Virtualization/VZVirtioQueue/queueSize)

Size of this queue.

### Instance Methods

[`func nextElement() -> VZVirtioQueueElement?`](/documentation/Virtualization/VZVirtioQueue/nextElement())

Gets the next element in this queue, if any.

## See Also

[`class VZCustomVirtioDevice`](/documentation/Virtualization/VZCustomVirtioDevice)

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

[`class VZVirtioQueueElement`](/documentation/Virtualization/VZVirtioQueueElement)

A unit of work on a Virtio queue, also known as a descriptor chain.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)