Re: [kvm-devel] Strange network behaviour

2007-12-05 Thread Lynn Kerby

On Dec 5, 2007, at 10:05 AM, Simon Gao wrote:
 I also saw the similar problem. However, it happens with I have  
 several
 KVM guests running and sharing the same network bridge. If just one
 single KVM guest, then everything works fine.

 Simon

I think I've been through similar problems as well.

Initially my guests would experience massive packet losses and huge  
delays somtime shortly after the second guest started.  Often the  
first guest continued to operate fairly well, but it was noticably  
degraded.  That is when I switched from the default QEMU ne2k device  
to the rtl8139 for all my virtual network taps.

A bunch of debugging eventually led me to check the mac addresses of  
all my guests on the bridge.  Not the host side TAP address, but the  
guest's mac address.  In my environment I found cases where more than  
one of the guests on the bridge had the same mac address and rewrote  
my startup scripts and configs to always assign a unique mac address  
to each network device.

I thought perhaps this may be related to something in KVM-55, but  
I've just shutdown and restarted my VMs on the KVM-55 modules and  
userspace and am not seeing any network problems with my VMs.

Here are the kvm/qemu command lines for 3 of my machines: (2  
FreeBSD-6.2 servers and a Ubuntu-7.10 server)
 /usr/local/bin/qemu-system-x86_64 -name FreeBSD_6.2 -hda /vm_img/ 
 bsd_dz1/disk0.qcow -m 256 -boot c -smp 1 -usb -usbdevice tablet - 
 vnc :0 -serial telnet::4100,server,nowait -monitor telnet:: 
 4200,server,nowait -net  
 nic,vlan=0,macaddr=52:54:00:12:34:56,model=rtl8139 -net  
 tap,vlan=0,ifname=tap0,script=/etc/kvm/kvm-ifup -net  
 nic,vlan=1,model=rtl8139 -net tap,vlan=1,ifname=dmz0,script=/etc/ 
 kvm/kvm-ifup

 /usr/local/bin/qemu-system-x86_64 -name DOM9-BSD62 -hda /vm_img/ 
 bsd_in1/dom9-disk1.qcow -hdb /vm_img/bsd_in1/dom9-disk2.raw -m 512 - 
 boot c -smp 2 -usb -usbdevice tablet -vnc :9 -serial telnet:: 
 4109,server,nowait -monitor telnet::4209,server,nowait -net  
 nic,vlan=0,macaddr=52:54:09:12:34:56,model=rtl8139 -net  
 tap,vlan=0,ifname=tap1,script=/etc/kvm/kvm-ifup

 /usr/local/bin/qemu-system-x86_64 -name DOMT2-UbuSrv7.10 -hda /dev/ 
 vg_r5/dom_t2 -m 512 -boot c -smp 1 -vnc :8 -serial telnet:: 
 4108,server,nowait -monitor telnet::4208,server,nowait -net  
 nic,vlan=0,macaddr=52:54:08:12:34:56,model=rtl8139 -net  
 tap,vlan=0,ifname=tap2,script=/etc/kvm/kvm-ifup

The kvm-ifup script referenced in these commands is very similar to  
the standard qemu-ifup except that it deals with multiple bridges,  
based on the interface name.  It may be worth noting that I'm not  
explicitly assigning a mac address to interface dmz0 in the first  
example, but other interfaces on that network all have unique mac  
addresses so it isn't critical.

You might want to examine the output of 'brctl showmacs br0' (use  
your bridge name in place of br0) and also check the interface stats  
on the bridge and any troublesome tap interfaces.

Lynn Kerby
San Martin, CA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Strange network behaviour

2007-12-04 Thread Lynn Kerby
Hi Mike,

Glad to hear that your networks are up now, but what are you using to  
connect/bridge them?  Those response times are horrible across the  
board!

All my VMs are connected to my internal network via a bridge on the  
host through their tap interfaces and a few lucky machines share  
another bridge that is on my DMZ with static IPs.  I think the  
network bridge method I use is based on some stuff I picked up a few  
years ago when working with the UML virtualization stuff.  I see sub  
millisecond ping responses in both directions and to all VMs (usually  
I've got 3 or 4 active, soon to expand to a few more).

My HOST config is similar though I've got a only 4GB of memory and  
I'm still running KVM-52 modules.  My guests are Ubuntu 7.10, Fedora  
8, and FreeBSD 6.2 at the moment with Mint4.0 and JeOS on the drawing  
board.

Lynn Kerby
San Martin, CA

On Dec 4, 2007, at 2:44 PM, Mike wrote:

 Hello,
 I already spoke to Izik Eidus. He told me to publish the results to  
 the
 problem at the mailinglist.

 Some time ago I wrote to the kvm-devel mailinglist that I had a  
 problem
 with my guests' networking dying.
 I got the hint to change the network card emulation. That worked.

 Now I noticed a strange behaviour.
 I have a gameserver running in a guest os. No problems on performance
 side, really fast.
 The only thing, when I make a ping test after unspecific time  
 periods I
 get this: (this peaks are even there if the gameserver isn't running)

Reply from 195.24.77.170: bytes=32 time=36ms TTL=57
Reply from 195.24.77.170: bytes=32 time=34ms TTL=57
Reply from 195.24.77.170: bytes=32 time=123ms TTL=57
Reply from 195.24.77.170: bytes=32 time=98ms TTL=57
Reply from 195.24.77.170: bytes=32 time=116ms TTL=57
Reply from 195.24.77.170: bytes=32 time=241ms TTL=57
Reply from 195.24.77.170: bytes=32 time=72ms TTL=57
Reply from 195.24.77.170: bytes=32 time=382ms TTL=57
Reply from 195.24.77.170: bytes=32 time=135ms TTL=57
Reply from 195.24.77.170: bytes=32 time=397ms TTL=57
Reply from 195.24.77.170: bytes=32 time=647ms TTL=57
Reply from 195.24.77.170: bytes=32 time=857ms TTL=57
Reply from 195.24.77.170: bytes=32 time=1156ms TTL=57
Reply from 195.24.77.170: bytes=32 time=692ms TTL=57
Reply from 195.24.77.170: bytes=32 time=604ms TTL=57
Reply from 195.24.77.170: bytes=32 time=35ms TTL=57
Reply from 195.24.77.170: bytes=32 time=34ms TTL=57
Reply from 195.24.77.170: bytes=32 time=35ms TTL=57
Reply from 195.24.77.170: bytes=32 time=188ms TTL=57
Reply from 195.24.77.170: bytes=32 time=39ms TTL=57
Reply from 195.24.77.170: bytes=32 time=46ms TTL=57
Reply from 195.24.77.170: bytes=32 time=34ms TTL=57
Reply from 195.24.77.170: bytes=32 time=34ms TTL=57
Reply from 195.24.77.170: bytes=32 time=39ms TTL=57

 This ping peaks are on *all* guests I'm currently running.
 I did a ping test the same time to the Host, with this result:

Reply from 195.24.77.169: bytes=32 time=38ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=39ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=38ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=35ms TTL=57
Reply from 195.24.77.169: bytes=32 time=40ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=35ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=35ms TTL=57
Reply from 195.24.77.169: bytes=32 time=37ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=35ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=34ms TTL=57
Reply from 195.24.77.169: bytes=32 time=33ms TTL=57

 As you can see, no peaks.
 Example of start command from a guest:
 kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net
 nic,vlan=0,macaddr=00:16:3e:00:00:01,model=rtl8139 -net tap -nographic
 -daemonize

 Here the pings from the guest started with the command line listed  
 above:

Reply from 195.24.77.171: bytes=32 time=37ms TTL=57
Reply from 195.24.77.171: bytes=32 time=37ms TTL=57
Reply from 195.24.77.171: bytes=32 time=97ms TTL=57
Reply from 195.24.77.171: bytes=32 time=60ms TTL=57
Reply from 195.24.77.171: bytes=32 time=186ms TTL=57
Reply from 195.24.77.171: bytes=32 time=363ms TTL=57
Reply from 195.24.77.171: bytes=32 time=368ms

Re: [kvm-devel] VM networking stops working

2007-11-21 Thread Lynn Kerby

On Nov 21, 2007, at 12:52 PM, Mike wrote:

 Hello,
 I have a problem with my virtual machines. I am using kvm53
 on an AMD Athlon(tm) 64 X2 Dual Core Processor 5000+.
 As distribution I use Ubuntu server 7.10.
 As kernel I use Linux 2.6.22-14-server #1 SMP Sun Oct 14 22:09:15  
 GMT 2007 x86_64 GNU/Linux.

 I have 3 different vms running. At the beginning they all work  
 without a problem.
 Then, after one moment to another one or more stop working.
 I did a ping test to all the machines, the vm with the failure  
 stops pinging.
 The result from external ping: Destination host unreachable.
 The same result from a ping onto the main server.

 Here are my configuration files:
 cat /etc/qemu-ifup
 #!/bin/sh
 /sbin/ifconfig $1 0.0.0.0 promisc up
 /usr/sbin/brctl addif br0 $1
 sleep 2
 cat /etc/network/interfaces
 auto lo
 iface lo inet loopback

 auto br0
 iface br0 inet static
 address 195.24.77.169
 netmask 255.255.255.0
 gateway 195.24.77.1
 bridge_ports eth0
 bridge_stp off
 bridge_maxwait 5
 I use scripts for starting the vms:
 kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net  
 nic,vlan=0,macaddr=00:16:3e:00:00:01 -net tap -nographic -daemonize
 kvm -hda postfix.img -m 512 -boot c -net  
 nic,vlan=0,macaddr=00:16:3e:00:00:12 -net tap -nographic -daemonize
 kvm -hda openvpn.img -m 256 -boot c -net  
 nic,vlan=0,macaddr=00:16:3e:00:00:03 -net tap -nographic -daemonize
 The tapN devices are being created at the startup of the vms.

 When I run dmesg I have this:
 [  112.390943] br0: port 2(tap1) entering learning state
 [  112.391919] br0: port 3(tap0) entering learning state
 [  112.397605] br0: port 4(tap2) entering learning state
 [  122.674313] tap0: no IPv6 routers present
 [  122.729185] tap1: no IPv6 routers present
 [  122.843901] tap2: no IPv6 routers present
 [  123.336081] kvm: emulating exchange as write
 [  127.367940] br0: topology change detected, propagating
 [  127.367949] br0: port 4(tap2) entering forwarding state
 [  127.362971] br0: topology change detected, propagating
 [  127.362977] br0: port 2(tap1) entering forwarding state
 [  127.362978] br0: topology change detected, propagating
 [  127.362980] br0: port 3(tap0) entering forwarding state

 No indication of a problem, nowhere in the log files.

 I don't know if the vms are freezing, or the network forwarding  
 stops working.
 I also activated net.ipv4.conf.default.forwarding=1

 I googled days for that problem, but without a result.
 I hope that maybe you have a solution for this problem. That would  
 be great, because I prefer using kvm instead of other  
 virtualization systems.

 Thank you very much in advance,
 Greetings from Luxembourg.

 Have a nice day,
 Mike

I had similar problems for my first week or so of trying to use KVM  
for my virtualization needs.  My problem was solved by adding a  
model=rtl8139 to the first -net option on the kvm/qemu command.   
The default ne2k emulation seems to be broken.  Another possibility  
is problems with macaddr.  In my testing I found that several of my  
machines were getting the same macaddr by default so now I specify  
them explicitly for each VM (or generate a dummy one based on the  
time for testing).

An example from one of my KVMMs (hopefully line wrapping won't  
interfere):

/usr/local/bin/qemu-system-x86_64 -name DOM9-BSD62 -hda /vm_img/ 
bsd_in1/dom9-disk1.qcow \
-hdb /vm_img/bsd_in1/dom9-disk2.raw -m 512 -boot c -smp 2 -usb - 
usbdevice tablet -vnc :9 \
-serial telnet::4109,server,nowait -monitor telnet:: 
4209,server,nowait \
-net nic,vlan=0,macaddr=52:54:09:12:34:56,model=rtl8139 \
-net tap,vlan=0,ifname=tap1,script=/etc/kvm/kvm-ifup


Lynn Kerby

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] SMP support on AMD64

2007-11-07 Thread Lynn Kerby

On Nov 7, 2007, at 3:06 AM, Avi Kivity wrote:

 Lynn Kerby wrote:
 Hi KVM developers (and lurkers like myself).

 Apologies in advance as this is probably not the right forum for  
 this  question.


 It is certainly the right forum.

Good to know.  There doesn't seem to be a lot of user oriented info  
for KVM and I was wondering if I just couldn't find the forums or what.

 I've had no success getting an SMP virtual machine running on my  
 AMD  Athlon64 X2 server.  The base system is Ubuntu 7.10  
 (recently  upgraded from 7.04) with a 2.6.22 kernel and I've tried  
 kvm releases  49  50 with no success.  My memory of whether or  
 not it worked  months ago with kvm-28 on the Ubuntu 2.6.20-16  
 kernel is no longer  with me :-(.  The recent failures have all  
 been BIOS problems at  rombios.c:10605.  I'm pretty sure I must  
 have something wrong in my  environment and have spent entirely  
 too much of my spare time trying  various things with no success.


 Yes you've been doing something wrong -- you should have reported  
 this quickly.  Worst case somebody would have pointed out something  
 trivial you're doing wrong and you'd have felt foolish for a bit.   
 But in this particular case...

I'd assumed (there's *that* word) that core developer types were  
using KVM on all kinds of hardware and that basics like this would  
have been shaken out.  I set up a few KVM virtual machines about 6  
months ago with the intent of migrating my mail server and some other  
functions to them but never quite got it working to my satisfaction.   
Now I've got major problems with the 10+ year old hardware (and  
software) with that system and it is becoming urgent.

 Can someone that has actually has an SMP virtual machine running   
 currently on an AMD processor (preferably a 64-bit guest) give me   
 some details on the base system kernel, KVM related bits, and the   
 guest OS?



 Turns out kvm smp on amd is broken.  I committed a fix for kvm-51,  
 and now I have FC6 running happily with two vcpus.

 If you see problems, please report them soon.  I'd rather have  
 noise on the list than problems going unreported.

 I'm attaching the patch which fixes the problem, let us know if it  
 helps or not (there may be more problems lurking).

Yes, that patch works nicely for me as does the kvm-51 release.

Thanks,

Lynn Kerby
San Martin, CA

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] SMP support on AMD64

2007-11-06 Thread Lynn Kerby
Hi KVM developers (and lurkers like myself).

Apologies in advance as this is probably not the right forum for this  
question.

I've had no success getting an SMP virtual machine running on my AMD  
Athlon64 X2 server.  The base system is Ubuntu 7.10 (recently  
upgraded from 7.04) with a 2.6.22 kernel and I've tried kvm releases  
49  50 with no success.  My memory of whether or not it worked  
months ago with kvm-28 on the Ubuntu 2.6.20-16 kernel is no longer  
with me :-(.  The recent failures have all been BIOS problems at  
rombios.c:10605.  I'm pretty sure I must have something wrong in my  
environment and have spent entirely too much of my spare time trying  
various things with no success.

Can someone that has actually has an SMP virtual machine running  
currently on an AMD processor (preferably a 64-bit guest) give me  
some details on the base system kernel, KVM related bits, and the  
guest OS?

Lynn Kerby
San Martin, CA

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel