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

# VZVirtioConsolePortConfigurationArray

A class that represents a collection of Virtio console port configurations.

```
class VZVirtioConsolePortConfigurationArray
```

## Overview

This array stores a collection of port configurations for a [`VZVirtioConsoleDeviceConfiguration`](/documentation/Virtualization/VZVirtioConsoleDeviceConfiguration). The index in the array corresponds to the port index that the VM uses. You can set a [`maximumPortCount`](/documentation/Virtualization/VZVirtioConsolePortArray/maximumPortCount) value, but the value must be larger than the highest indexed port. If there’s no `maximumPortCount` value set, the framework uses the value the highest indexed port.

## Topics

### Determining the number of ports

[`maximumPortCount`](/documentation/Virtualization/VZVirtioConsolePortConfigurationArray/maximumPortCount)

An unsigned integer that represents the maximum number of ports allocated by this device.

### Accessing a specific port

[`-  objectAtIndexedSubscript:`](/documentation/Virtualization/VZVirtioConsolePortConfigurationArray/subscript(_:))

Returns the Virtio console port configuration as the specified index.

### Adding a configuration

[`-  setObject:atIndexedSubscript:`](/documentation/Virtualization/VZVirtioConsolePortConfigurationArray/setObject:atIndexedSubscript:)

## Relationships

### Conforms To

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

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

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

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

[`NSCopying`](/documentation/Foundation/NSCopying)

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

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

### 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)