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

# VZNetworkDevice

A base class that represents a network device in a virtual machine.

```
class VZNetworkDevice
```

## Overview

Don’t instantiate a [`VZNetworkDevice`](/documentation/Virtualization/VZNetworkDevice) directly. When you create a [`VZVirtualMachineConfiguration`](/documentation/Virtualization/VZVirtualMachineConfiguration) instance with a [`VZVirtualMachineConfiguration`](/documentation/Virtualization/VZVirtualMachineConfiguration) the system creates the number of network devices based on the number of [`VZVirtioNetworkDeviceConfiguration`](/documentation/Virtualization/VZVirtioNetworkDeviceConfiguration) objects you specify in the VM configuration. Before initializing the virtual machine (VM), validate the configuration using [`validate()`](/documentation/Virtualization/VZVirtualMachineConfiguration/validate()) to ensure the user’s computer supports the number of network and other devices you’ve specified.  

For many purposes, a single network that uses a Network Address Translation (NAT) attachment and connects the VM to the host computer’s network is sufficient. You can use additional network interfaces for purposes of your own design, such as:

- Bridging several physical interfaces to connect to multiple networks.
- Using the file descriptor attachment to create specialized connections for different purposes.

You access the network devices through the `VZVirtualMachine`.[`networkDevices`](/documentation/Virtualization/VZVirtualMachine/networkDevices) property. The network devices map to their respective configurations in a one to one relationship, where index `i` of `VZVirtualMachine.networkDevices` corresponds to the network device configuration at index `i` set on `VZVirtualMachineConfiguration`.[`networkDevices`](/documentation/Virtualization/VZVirtualMachineConfiguration/networkDevices).

## Topics

### Getting the network attachment point

[`attachment`](/documentation/Virtualization/VZNetworkDevice/attachment)

The network attachment that’s connected to this network device.

## See Also

[`VZNetworkDeviceConfiguration`](/documentation/Virtualization/VZNetworkDeviceConfiguration)

The common configuration traits for network devices.

  <doc://com.apple.documentation/documentation/vmnet>



---

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)