<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZVirtualMachine/queue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZVirtualMachine(py)queue"
  },
  "title" : "queue"
}
-->

# queue

The queue associated with this virtual machine.

```
nonisolated var queue: dispatch_queue_t { get }
```

## Discussion

This property is a reference to the queue the framework used to create the virtual machine when initialized using [`init(configuration:queue:)`](/documentation/Virtualization/VZVirtualMachine/init(configuration:queue:)). If not specified, the default is the main queue.

The property is accessible from any queue or actor.

Other properties or function calls on [`VZVirtualMachine`](/documentation/Virtualization/VZVirtualMachine) must happen on this queue. The framework also invokes any completion handlers from asynchronous functions on this queue.

The following example shows use of the `VZVirtualMachine.queue` property to check to see if it’s possible to start a VM.

```swift
let canStart = virtualMachine.queue.sync {
    virtualMachine.canStart
}
```

---

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)