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

# attachment

The object that defines how the virtual network device communicates with the host system.

```
var attachment: VZNetworkDeviceAttachment? { get set }
```

## Discussion

The default value of this property is `nil`. Assign an appropriate value to specify the type of network interface you want to make available to the guest operating system. For example, assign a [`VZBridgedNetworkDeviceAttachment`](/documentation/Virtualization/VZBridgedNetworkDeviceAttachment) object to grant access to one of the host computer’s physical network interfaces.

> Important:
> If you assign a ``doc://com.apple.virtualization/documentation/Virtualization/VZBridgedNetworkDeviceAttachment`` object to this property, your app must have the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.vm.networking> entitlement. Without that entitlement, validation of your ``doc://com.apple.virtualization/documentation/Virtualization/VZVirtualMachineConfiguration`` object fails.

---

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)