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

# socketDevices

The array of socket devices that the VM configures for use ports in the guest VM.

```
var socketDevices: [VZSocketDevice] { get }
```

## Discussion

If you included a [`VZVirtioSocketDeviceConfiguration`](/documentation/Virtualization/VZVirtioSocketDeviceConfiguration) object in the configuration of your VM, this property contains a corresponding [`VZVirtioSocketDevice`](/documentation/Virtualization/VZVirtioSocketDevice) object. Use that object to configure the ports your VM makes available to the guest operating system.

If you didn’t include a socket device in your configuration, this property contains an empty array.

---

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)