[Hampshire] KQEMU bridge for multiple VM's performance probl…

Top Page

Reply to this message
Author: Damian Brasher
Date:  
To: hampshire
Subject: [Hampshire] KQEMU bridge for multiple VM's performance problem
Hi List

I have a serious performance problem with a KQEMU installation. I am
trying to run multiple VM's all with their own ip address, mac and
hostname on the LAN. The hostnames, mac's and ip's are all defined on a
dns-server so no problems there. The machine, using root initially, is
running RHEL5 64bit, ip forwarding enabled, a relaxed firewall (no rules
just forwarding for testing), enough disk space and ram for the VM's and I
have used bridge utilities to build a bridge br0 using the script below:

#!/bin/sh

# Setup the bridge
brctl addbr br0
# Add host ethernet adapter to the bridge
brctl addif br0 eth0
# Remove IP address from host ethernet device
ifconfig eth0 0.0.0.0 up
# Grab an IP address from DHCP for the bridge
dhclient br0
# Add the kqemu module
modprobe kqemu

I have disk images with RHEL 5 32bit machines and launch them using this
script:

#!/bin/bash
/usr/local/bin/qemu-system-x86_64 -kernel-kqemu -cdrom images/boot.iso \
-boot c -net nic,vlan=0 -localtime -m 512m \
-net tap,vlan=0,ifname=tap0,script=/etc/kqemu/qemu-ifup images/vdisk01.img

Notice I do not define the host mac address. The bridge works without
defining the mac, if I do, i.e.

#!/bin/bash
/usr/local/bin/qemu-system-x86_64 -kernel-kqemu -cdrom images/boot.iso \
-boot d -net nic,vlan=0,macaddr=23:23:23:00:00:01 -localtime -m 512m\
-net tap,vlan=0,ifname=tap0,script=/etc/kqemu/qemu-ifup images/vdisk01.img

the tap0 device does bind but bridging simply does not work, ping from the
host to the VM returns nothing.

The script to bind is:

#!/bin/bash

BRIF=br0
echo "Connecting interface $1 to bridge $BRIF"
/sbin/ifconfig $1 0.0.0.0 promisc up
/usr/sbin/brctl addif $BRIF $1

So the bridge does work but with no predefined mac for the host which I do
*need*.

The other issue when I have one or more VM's running is slow network speed
and erratic latency, lost packets on commence of ping from another host on
the LAN, i.e. my laptop or another machine and from the host itself where
the ping responses are slightly better but I still loose packets.

Has anyone a similar setup and managed to bind tap$ with a predefined mac
and have the bridge work and also has good quality bridge speed / network
preformance?

Versions:

qemu 0.9.0 (from source)
kqemu 1.3.0pre11 (from source)
kernel 2.6.18-8.1.8.el5 SMP 2 x apparent CPU due to HT enable

TIA
--
Damian Brasher
www.interlinux.co.uk
All mail scanned by clam-av http://www.clamav.net/