digital-domain.net
QEMU
QEMU Guest Bridge Networking
Make sure you have bridge networking support in your kernel and possibly
the bridge utils package.
Configure a bridge on your system, on Fedora I have the following (using the
old network service and not NetworkManager)
ifcfg-br0
TYPE=Bridge
DEVICE=br0
BOOTPROTO=dhcp
DELAY=0
ONBOOT=yes
ifcfg-p17p1
TYPE=Ethernet
DEVICE=p17p1
ONBOOT=yes
HWADDR=00:24:1D:BA:80:30
BRIDGE=br0
Note: The bridge device is the one that is assigned the IP address, it
uses the MAC address of the physical interface.
Or to do this manually, something like
# brctl addbr br0
# brctl addif br0 p17p1
# ip link set dev p17p1 up
# ip link set dev br0 up
# dhclient br0
Create a file called bridge.conf in /etc/qemu with the following
contents
allow br0
and do the following
# chmod 640 /etc/qemu/bridge.conf
# chown root:qemu /etc/qemu/bridge.conf
Then run a guest something like
$ qemu-kvm -m 768 -k en-gb -smp 2 --cpu host -vga vmware -sdl \
-drive file=/home/andrew/machines/qemu/f20-x86-64.img,if=virtio \
-net nic,model=virtio,macaddr=de:ad:be:ef:34:57 \
-net tap,helper=/usr/libexec/qemu-bridge-helper
Note: Just run the guest as a normal user.