Running inside QEMU with TAP networking

Quick hints:

GNU/Linux Host System

Invoking

Start script (needs libcap):

#!/bin/sh

IFUP=/home/sky/projects/minix/qemu-ifup

sudo execcap cap_net_admin=ep \
    qemu -no-kqemu -m 256 -boot c \
    -hda TARGET_HDD \
    -net tap,vlan=0,ifname=$TAPDEV,script=$IFUP \
    -net nic

sudo tunctl -d $TAPDEV -f /dev/net/tun

qemu-ifup

#!/bin/sh

set -x

sudo sysctl -w net.ipv4.ip_forward=1

sudo iptables -t nat -F POSTROUTING

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

sudo ifconfig $1 192.168.2.254

Minix Guest System

qemu_pci=1 and NIC type 4 (dp8390 in /etc/inet.conf)

Routing

add_route -g 192.168.2.254

resolv.conf

cat > /etc/resolv.conf <<EOF
nameserver 192.168.1.1
EOF

Common Problems

Task Ideas

Trivial

Janitorial

Ports

API

Unsorted/Hard

Bugfixes