---
title: VZUSBController
framework: virtualization
role: symbol
role_heading: Class
path: virtualization/vzusbcontroller
---

# VZUSBController

A class that represents a USB controller in a VM.

## Declaration

```swift
class VZUSBController
```

## Overview

Overview Don’t create a VZUSBController directly. You need to first configure USB controllers on a VZVirtualMachineConfiguration through a subclass of VZUSBControllerConfiguration. When you create a VZVirtualMachine from the configuration, the USB controllers are available through the usbControllers property. The concrete type of a VZUSBController corresponds to the type the configuration uses. For example, a VZXHCIControllerConfiguration leads to a device of type VZXHCIController.

## Topics

### Instance properties

- [usbDevices](virtualization/vzusbcontroller/usbdevices.md)

### Attaching and detaching devices

- [attach(device:completionHandler:)](virtualization/vzusbcontroller/attach(device:completionhandler:).md)
- [detach(device:completionHandler:)](virtualization/vzusbcontroller/detach(device:completionhandler:).md)

### Protocols

- [VZUSBController.Delegate](virtualization/vzusbcontroller/delegate-swift.protocol.md)

### Instance Properties

- [delegate](virtualization/vzusbcontroller/delegate-swift.property.md)

## Relationships

### Inherits From

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

### Inherited By

- [VZXHCIController](virtualization/vzxhcicontroller.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

### Controllers

- [VZXHCIController](virtualization/vzxhcicontroller.md)
