[SATLUG] kvm networking
gregswift at gmail.com
Mon Jan 23 22:34:06 CST 2012
On Mon, Jan 23, 2012 at 19:58, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
> Greg Swift wrote:
>> The section 'private network bridge' should get you started, and then you
>> would just ensure that the local br0 interface has an IP on that subnet.
>> I've not done this exact method before, because in all my environments I
>> need the private network to span multiple virtual hosts. But its the same
>> basic concept, just without an attachment to a real interface on the
>> virtual host.
> Thanks Greg. I've been looking at that page, but trying to interpret it
> is a little tough. I just found out that I didn't have bridging installed
> in my kernel. I also needed to install bridge-utils-1.5.
> The biggest problem with the www.linux-kvm.org docs is that they assume
> that you are using RedHat or Debian. I'm trying to get down to the program
> level instead relying on scripts that make assumptions that don't match my
> I've got to disagree, cause as I was reading the page I linked to and I
was thinking how unlike Red Hat the instructions were, so I re-read your
original email and realized you likely weren't using RH and so linked to
it. Red Hat relies upon scripts in the /etc/sysconfig/network-scripts
directory and debian relies upon the /etc/network/interface for
configuration. Neither are referenced in that page. It just tells you how
to specifically add the bridge interface utilizing the brctl, which as you
surmised is apart of bridge-utils.
To create a bridge like this on my Fedora box all I did was:
[root at myboxen network-scripts]# cat ifcfg-br0
[root at myboxen network-scripts]# ifup br1
[root at myboxen network-scripts]# ifconfig
br0 Link encap:Ethernet HWaddr D2:73:C2:12:9A:9A
inet addr:192.168.200.1 Bcast:192.168.200.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 b) TX bytes:9704 (9.4 KiB)
And then libvirtd handes the association for me through the virsh tool (or
virt-manager)....which as you said you don't use... however... libvirtd is
there to facilitate programming, so thats something to bear in mind.
i'll concede I haven't used the linux-kvm instructions I linked to, but
they should get you there because they seem to be doing all the work the
included network stack in Fedora is doing. Which also brings up a good
point.. review the networking code form RH/Fedora and Debian. should be
plenty of pointers.
More information about the SATLUG