Guest-to-world
This section describes a configuration for a guest communicating with the outside world through network drivers in the hypervisor host.
The figure below illustrates guest-to-world communication using a virtio-net vdev in the guest and a mods-vdevpeer-net.so driver in the hypervisor host connected via a bridge to an Ethernet driver also in the host.
Configure a virtio-net vdev
system qnx80-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 checksum
This is exactly like the virtio-net vdev configuration in Guest-to-host
.
Enable services in the host
In the host, start by starting io-sock, specifying mods-vdevpeer-net.so and other network drivers. For example:
io-sock -o config=/etc/system/config/net/io-sock.conf -m phy -m fdt -m phy_fdt \
-m pci -d em -m vdevpeer-net
Note the -d em
option for io-sock, which starts
the driver for an Intel PRO/1000 Gigabit Ethernet adapter needed to connect to the
outside world.
Next, bring up the network interfaces in the host. For example:
if_up -p em0
ifconfig em0 up
ifconfig vp0 create up
vpctl vp0 peer=/dev/qvm/qnx80-arm-guest/p2p bind=/dev/vdevpeers/vp0 mac=a0b0c0d0e0f0
Use a command like the following to configure the MAC address for the bridge and add the appropriate network interface (or interfaces) to it:
sysctl -w net.link.bridge.inherit_mac=1 > /dev/null
ifconfig bridge0 create up addm vp0 addm em0
Use dhcpcd to assign network IP addresses. For example:
dhcpcd -bqq -w bridge0
Finally, configure other networking services. For example:
ifconfig vp0 -txcsum -txcsum6 -tso6 -tso4
ifconfig vp1 -txcsum -txcsum6 -tso6 -tso4
/proc/boot/.ssh-server.sh