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-net.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 that you can establish a peer-to-peer communication with devnp-vdevpeer-net.so. For example, for a 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-net.so driver, start the internet services (inet), then create a bridge. For example:

io-pkt-v6-hc \
	-d vdevpeer-net \
		peer=/dev/qvm/qnx7-arm-guest/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

Note the -d ravb mac=126ce901562c option, which starts the driver for Renesas RAVB Ethernet interfaces needed to connect to the outside world.

Add the interface to the bridge in the host

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

ifconfig vp0 up
brconfig bridge0 add vp0

Use the bridge in the host to connect the devnp-vdevpeer-net.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).