Guest-to-world

The following describes a configuration with a guest connecting to the outside world through an Ethernet driver in the hypervisor host.

Figure 1. Guest-to-world communication with an Ethernet driver in the hypervisor host.

The figure above illustrates guest-to-world communication using a virtio-net vdev in the guest and devnp-vdevpeer.so and a bridge in the hypervisor host.

Configure a virtio-net vdev

In the configuration for the VM (qvm process instance) hosting the guest, configure a virtio-net vdev so you can establish a peer-to-peer communication with devnp-vdevpeer.so. For example, for an QNX Neutrino 7.0 guest on an ARM board:

system qnx7-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

This is exactly like the virtio-net vdev configuration in Guest-to-host.

Enable services in the host

In the host, start io-pkt-*, specifying the devnp-vdevpeer.so driver, start the internet services (inet), then create a bridge (see Bridge and tap interfaces in this chapter). For example:

io-pkt-v6-hc \
	-d vdevpeer peer=/dev/qvm-arm-guest/qnx7/p2p,bind=/dev/vdevpeers/vp0,mac=a0b0c0d0e0f0
	-d ravb mac=126ce901562c 
	-p tcpip pkt_typed_mem=below4G
	...
inetd
	/usr/bin/sshd
dhclient -nw -lf /tmp/dhclient.leases ravb0
        ...
        ifconfig bridge0 create
        brconfig bridge0 add ravb0 up

Add the interface to the bridge

Add the devnp-vdevpeer.so interface to the bridge. For example:

ifconfig vp0 up
brconfig bridge0 add vp0

Use the bridge in the host to connect the devnp-vdevpeer.so node to the Ethernet driver in the host (see “Acting as a bridge” in the Core Networking Stack User's Guide and brconfig in the Utilities Reference).