This section describes a configuration for a virtio-net vdev in a guest communicating with a network driver in the hypervisor host.
The figure below illustrates a peer-to-peer connection between the virtio-net vdev in a guest and the devnp-vdevpeer-net.so io-pkt-* driver in the hypervisor host.
The following excerpt shows the virtio-net vdev configuration in the *.qvmconf file for the VM hosting the guest.
For a QNX guest on an ARM board, configure a virtio-net vdev as follows:
system qnx71-arm-guest ... # The loc and intr gic options are for ARM only. The guest will see the # virtio-net vdev as a memory-mapped I/O device at the specified location. vdev virtio-net loc 0x1c0c0000 intr gic:40 mac aa:aa:aa:aa:aa:aa name p2p peer /dev/vdevpeers/vp0 peerfeats 0x3
The following excerpt shows the vdevpeer-net driver startup options that will enable the hypervisor host to connect to a node in the guest.
When starting io-pkt-* in the host, specify the following options for the vdevpeer-net driver:
io-pkt-v6-hc -d vdevpeer-net \ peer=/dev/qvm/qnx71-arm-guest/p2p,bind=/dev/vdevpeers/vp0,mac=a0b0c0d0e0f0
This subsection provides instructions for enabling the interface. Suppose that you have already enabled an interface on the host, for example, as follows:
ifconfig vp0 up ifconfig vp0 192.168.1.1
where vp0 is the peer-to-peer interface on the host, and 192.168.1.1 is its address. You must now enable the interface on the guest and assign it a static IP address in the same subnet as the host. For example, for a QNX guest:
ifconfig vt0 192.168.1.2
where vt0 is the name of the interface on the guest, and 192.168.1.2 is an address in the same subnet as the host.
For a Linux guest:
sudo ifconfig enp0s3f0 up sudo ifconfig enp0s3f0 192.168.1.2
where enp0s3f0 is the peer-to-peer interface, and 192.168.1.2 is an address in the same subnet as the host.
If peerfeats bit 1 (one) is set for the peer interface on the guest, you must ensure that the checksum settings for the interface on the host match those for the interface on the guest. For example, to disable checksums for TCP and UDP on the node, configure it as follows:
ifconfig vp0 -tcp4csum -udp4csum -udp6csum -tcp6csum
The guest sees network interfaces with vt or enp prefixes. It isn't aware of any peer naming, so you must define how a vt and enp interface is mapped to a peer. MAC addresses provide confirmation of the mapping.