[et-mgmt-tools] Networking modes from koan ("user" vs "bridged")

Daniel P. Berrange berrange at redhat.com
Mon Aug 13 23:17:52 UTC 2007


On Mon, Aug 13, 2007 at 06:47:33PM -0400, Michael DeHaan wrote:
> Hi folks,
> 
> Apparently I had koan set up to install Xen guests in "user" networking 
> mode instead of "bridged" mode, which means the IP's the virtual guests 
> would be not be accessible
> from outside the virtual host.   This does not seem to be what most 
> folks would want, so I've changed it to "bridged".
> 
> I've fixed this upstream (see git).  Basically if you want to change 
> this yourself, just change "user" to "bridged" in xencreate.py 
> (/usr/lib/python2.4/site-packages/koan/xencreate.py).
> 
> Or, here's the patch to do the same:
> 
> http://git.fedoraproject.org/?p=hosted/koan;a=commitdiff;h=3cf1bcd2a967fc8dfb84cff7b5e55234a96ed445
> 
> That same one-line change is not working for me with KVM though I'm 
> going to investigate and see what it takes to make KVM work this way as 
> well -- assuming it's doable --
> which it most likely is.

It should work with KVM - you just need to have something to bridge to
and you need to specify what it is. There's basically 3 networking modes

 - type="bridge"  - bridge the virtual interface to the physical LAN. Needs
   to have host setup so that one or more of the physical ethernet devices
   are members of bridges. Xen's network script does this automatically for
   eth0/xenbr0. I don't recommend using that though. Instead follow example
   number #2   here

   http://watzmann.net/blog/index.php/2007/04/27/networking_with_kvm_and_libvirt


  When passing type='bridge' you also need to specufy what device you want to
  bridge to - ie the name of the bridge shown by brctl show. If following the
  link above, this would be 'eth0' (your physical device is peth0).

 - type="network" - connect the virtual interface to a virtual network. This
   virtual network consists of an isolated bridge device with no physical
   devices attached. Connectivity to the outside world is via NAT. This is
    xample #1 in the URL above

   When passing type='user' you also need to specify what network you wanto
   to attach to. Libvirt provides one called 'default' out of the box (this
   is where the virbr0 comes from).

 - type="user" - this is only relevant for QEMU guests - it is not supported
   for Xen. It is a special NAT style connetion that doesn't rely on  the
   host networking stack at all. It is basically only intended for people
   who don't have root  who still want to use QEMU. If it works at all with
   Xen that is pure luck & certainly not intended - it is a bug that libvirt
   does not reject this config in the Xen case

The type='bridge' is the only one which really makes much sense for koan
I think, perhaps type='network' in some real niche cases & certainly not
type='user'.


Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the et-mgmt-tools mailing list