Configuring bridges to use with KVM
Lionel Porcheron
lionel.porcheron at ubuntu.com
Mon Jul 12 16:40:12 UTC 2010
Le 12/07/2010 18:23, carlopmart a écrit :
> On 07/12/2010 06:17 PM, Serge E. Hallyn wrote:
>> Quoting carlopmart (carlopmart at gmail.com):
>>> Hi all,
>>>
>>> I have a problem with an ubuntu lucid 10.04 server used for KVM virtualization. My
>>> problem appears when I try to configure an "empty" bridge in /etc/network/interfaces
>>> file. For example, with a RedHat based distro (RHEL, CentOS) I can create a config
>>> file ifcfg-br20 like this:
>>>
>>> DEVICE=br20
>>> TYPE=Bridge
>>> ONBOOT=yes
>>> DELAY=0
>>> STP=off
>>> NM_CONTROLLED=no
>>>
>>> and then network startup script creates an empty bridge without bind any physical
>>> interface. I have tried same procedure to configure several empty bridges under
>>> ubuntu without luck:
>>>
>>> auto intprodif
>>> iface intprodif inet static
>>> bridge_stp off
>>> bridge_fd 9
>>> bridge_hello 2
>>> bridge_maxage 12
>>>
>>> When i try to start this bridge with "ifup intprodif" command returns me this error:
>>>
>>> carlos at silmaril:~$ sudo ifup intprodif
>>> Don't seem to be have all the variables for intprodif/inet.
>>> Failed to bring up intprodif.
>>>
>>> How can I define an empty bridge without binding any physical interface into it??
>>>
>>> Many thanks.
>>
>> man 5 interfaces says that for 'inet static', the following are required:
>> address
>> netmask
>>
>> Add those and see if it still complains?
>>
>> -serge
>>
>
> Thanks Serge. I have changed static to manual and ... nothing happens. See:
>
> auto intprodif
> iface intprodif inet manual
> bridge_stp off
> bridge_fd 9
> bridge_hello 2
> bridge_maxage 12
>
> .. and when I execute "ifup intprodif":
>
> carlos at silmaril:~$ sudo ifup intprodif
> Restarting openntpd: ntpd.
> ssh stop/waiting
> ssh start/running, process 8467
>
> .. doesn't returns any error, but if I execute "brctl show":
>
> carlos at silmaril:~$ brctl show
> bridge name bridge id STP enabled interfaces
> carlos at silmaril:~$
>
> ... bridge doesn't exists ... Any idea???
>
>
I think you also want to precise which physical interface you're
bridging. Here is the configuration I use:
auto br0
iface br0 inet manual
bridge_ports eth0
bridge_hello 2
bridge_maxage 12
bridge_stp off
(then you need to bridge your vm on br0 in libvirt configuration files).
Regards,
Lionel
More information about the ubuntu-server
mailing list