---
title: attachment
framework: virtualization
role: symbol
role_heading: Instance Property
path: virtualization/vznetworkdeviceconfiguration/attachment
---

# attachment

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

## Declaration

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

## Discussion

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 object to grant access to one of the host computer’s physical network interfaces. important: If you assign a VZBridgedNetworkDeviceAttachment object to this property, your app must have the com.apple.vm.networking entitlement. Without that entitlement, validation of your VZVirtualMachineConfiguration object fails.

## See Also

### Setting configuration attributes

- [macAddress](virtualization/vznetworkdeviceconfiguration/macaddress.md)
