[et-mgmt-tools] Networking modes from koan ("user" vs "bridged")
Michael DeHaan
mdehaan at redhat.com
Tue Aug 14 21:37:59 UTC 2007
Daniel P. Berrange wrote:
> 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.
>
Ok, with Dan's help (thanks!), I've hammered out a solution to this...
You can read about how it works on the Wiki:
https://hosted.fedoraproject.org/projects/cobbler/wiki/VirtNetworkingSetupForUseWithKoan
Basically this is going to be in koan 0.6.1 and if you want to try this
out now, pull from the latest git source, and build a version of koan.
As this is rather important/useful, I'll probably push this out in about
a week or so rather than including this in a more evolved
"testing" release. However, you don't have to wait -- testing is still
very much appreciated :)
--Michael
More information about the et-mgmt-tools
mailing list