Virtualization.Framework support for VZFileHandleNetworkDeviceAttachment

Hi, I am trying to create a virtual-machine using Virtualization.Framework (Reference) and trying to use VZFileHandleNetworkDeviceAttachment (Referece) as network device.

The creation and starting of VM are successful but am not receiving any raw packets via the created datagram socket.

Is there any working example for using VZFileHandleNetworkDeviceAttachment. Thanks in advance.

Replies

There is no code sample for VZFileHandleNetworkDeviceAttachment.

The most common error with this attachment is passing a datagram socket that is not connected.

The simplest way to set up the sockets is the socketpair() system call with a domain AF_UNIX and type SOCK_DGRAM. If that does not work, can you share how your attachment is set up?