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

# socketDevices

The socket device that you use to implement port-based communication with the guest operating system.

```
var socketDevices: [VZSocketDeviceConfiguration] { get set }
```

## Discussion

The default value of this property is an empty array. If your VM supports port-based communication with sockets, create a single [`VZVirtioSocketDeviceConfiguration`](/documentation/Virtualization/VZVirtioSocketDeviceConfiguration) object, add it to an array, and assign it to this property. After initializing the virtual machine, use the object in its [`socketDevices`](/documentation/Virtualization/VZVirtualMachine/socketDevices) property to configure the port information and handlers.

---

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)