Contents

init(network:)

Creates the attachment and configures it with the specified data.

Declaration

init(network: vmnet_network_ref)

Parameters

  • network:

    The logical network object

Return Value

An initialized VZVmnetNetworkDeviceAttachment object, or nil if there was an error.

Discussion

To ensure proper isolation between application processes, a virtual machine (VM) can only use the network that the same application process creates. If an application’s VM tries to use a network that another application’s VM creates, initialization fails.

For more information on vmnet configuration requirements and restrictions, see vmnet

The following example demonstrates how to create and initialize a custom network using VZVmnetNetworkDeviceAttachment.

See Also

Creating the vmnet network device attachment