[SATLUG] kvm networking

Bruce Dubbs bruce.dubbs at gmail.com
Wed Jan 25 17:21:47 CST 2012


David and Greg,
   Thanks for your help.  I finally got things running.  Here are my 
notes.
I still need to automate things,  but that's not particularly difficult.

   -- Bruce

------------------

Set VT option in BIOS.

Need bridge-utils-1.5.tar.gz
      qemu-kvm-1.0.tar.gz

groupadd -g 61 kvm
usermod -g kvm userid

KERNEL
   CONFIG_BRIDGE=y
   CONFIG_STP=y
   CONFIG_TUN=y
   CONFIG_HAVE_KVM=y
   CONFIG_KVM=y
   CONFIG_KVM_INTEL=y

# Installed in /opt/kvm
# Do some convenience things

cd /opt/kvm/bin
sudo chmod 4755 qemu-system-x86_64
ln -s qemu-system-x86_64 qemu
export PATH=/opt/kvm/bin:$PATH

# Set host interface to go through br0 instead of eth0

brctl addbr br0
brctl addif eth0
brctl stp   br0 off

ip link set br0  up
ip link set eth0 up

ip addr  add             192.168.0.22/24 dev br0
ip route add default via 192.168.0.1     dev br0

# Start qemu

qemu -hda vdisk.img -m 1G -net nic -net tap,script=no

# Add new tap0 interface to bridge

ip addr add 0.0.0.0 dev tap0
ip link set             tap0 up
brctl addif br0         tap0

On client, it appears that DHCP works.



More information about the SATLUG mailing list