Toni Mueller wrote:
> Package: qemu-kvm
> Version: 0.11.1+dfsg-1
> Severity: normal
> 
> Hello,
> 
> networking does not come up on my machine. I changed the script
[]
> # only add the interface to default-route bridge if we
> # have such interface (with default route) and if that
> # interface is actually a bridge.
> if [ -n "$switch" -a -d /sys/class/net/$switch/bridge/. ]; then
>   /usr/sbin/brctl addif $switch $1 || :
>   logger -p daemon.info "kvm: added interface $1 to $switch"
> fi
> --------------------------------------- cut
> 
> My "normal" routing table looks like this:
> 
> $ netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 217.0.118.194   0.0.0.0         255.255.255.255 UH        0 0          0 ppp0
> 192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 br0
> 0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 ppp0
> 
> 
> 
> After starting a VM, I found this in my /var/log/daemon.log:
> 
>   Mar  6 16:12:22 debian logger: kvm: found switch ppp0
> 
> This is obviously wrong. I suggest to check for bridge interfaces
> instead of interfaces with a default route, and add the tapN interface
> to that.

The thing here is that the supplied script is very simplistic.
It is only intended for trivial most common situation, and
even that is not completely handled (the bridge isn't created
automatically).

This is because kvm isn't really intended to be smart and figure
it all out, and because messing with the network is just too
fragile (I for one will hate packages which substitute my
eth0 with a bridge and change firewall rules behind my back).

There are two ways around this, and neither of them involves
changes in kvm package.  One is to use more advanced support
tools like virt-manager, which has quite large piece of code
to support networking in different variations.

And another is to change the script in question (/etc/kvm/kvm-ifup)
to do what is right on your host.  I'd say this is the best
option - you know your setup, and it is a configuration file
for exactly this reason.

Default /etc/kvm/kvm-ifup will never try to cover all cases.

Maybe it is a good idea to look at the bridge and add the
interface to the bridge if there's only one bridge.  But
I don't really see why it is better than just using the
interface with default route -- maybe even that is overkill
and/or illogical: since we don't create the bridge at install
time, why should we try to find such a bridge in kvm-ifup?

Toni, do you agree?

Thanks!

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to