On Wed, Jul 9, 2008 at 11:28 AM, Bill Davidsen <[EMAIL PROTECTED]> wrote:
> A bit of the original problem seems to have been clipped before you read it,
> or I stated it poorly.

i think you're very confused.  maybe you got it working the hard way,
but it's really simple to do the easy way.

first, you have to do some small preparations on the host machine, but
nothing difficult.  this is what i do on my workstation (kubuntu) so
that i can fire up a test VM at any moment's whim:

- setup a bridge, and use it as main interface
- add a /etc/qemu-ifup script
- kvm kernel module
- make sure /dev/kvm and /dev/net/tun have the correct privilege access.

for the first one, in debian-like systems just use the following in
/dev/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto br0
iface br0 inet static
        address 172.18.13.66
        netmask 255.255.0.0
        network 172.18.0.0
        broadcast 172.18.255.255
        gateway 172.18.0.1
        bridge_ports eth0

that makes br0 my main interface, and adds eth0 to it. when i'm not
running any VM, it doesn't interfere in any way, except for any
utilities that default to eth0... if that were a problem, i could
simply rename eth0=>peth0 and br0=>eth0 (i think the Xen scripts do
similar tricks)

when that's set, /etc/qemu-ifup just have to setup the tun/tap
interface and add to the bridge:
#!/bin/sh
ifconfig $1 0.0.0.0 promisc up
brctl addif br0 $1

and that's it!  no need to meddle with iptables.  note that i don't
even set the IP, the VM is connected to the LAN, and it setups it's
own IP "from inside"

hope that helps

-- 
Javier
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to