Can I Have More Than 1 Bridge Attached To A KVM

Home » CentOS-Virt » Can I Have More Than 1 Bridge Attached To A KVM
CentOS-Virt 4 Comments

Hello Everybody,

I have a physical machine with 4 Ethernet cards that I have mapped to 4 bridges.

I would like to have each of my KVMs use 2 bridges for NIC bonding.

1. Can I have more than one bridge assign to one KVM?

2. Can I use virt-install to assign a KVM with more than one bridge during the KVM installation?

a. It was a long shot but I have tried bridge=br0,br1 ; bridge=br0 bridge=br1 – never worked…..

Thanks so much,

Meir

4 thoughts on - Can I Have More Than 1 Bridge Attached To A KVM

  • You can try to assign each bridge to its own individual virtual NIC in VM, at least it works with virt-manager + libvirt + qemu-kvm with preconfigured bridges.

    02.04.2013 11:41

  • Thanks. The bridges are preconfigured at the box. No issues there. Can I assign a second physical NiC as a second interface at the KVM? Can I do it at the installation time using virt-install? Can I do it by editing a file after the KVM is created? I would like to automate things. Thank you

    Sent from my iPhone

    You can try to assign each bridge to its own individual virtual NIC in VM, at least it works with virt-manager + libvirt + qemu-kvm with preconfigured bridges.

    02.04.2013 11:41

  • As far as I know the only way to directly assign real NICs into VM
    without bridging is to use PCI passthrough, though this way imposes several limitations, mostly in IOMMU / VT-d hardware support.

    But if bridging is acceptable then you can repeat –network bridge: option in virt-install command line several times to create as many NICs inside VM as you want.

    02.04.2013 14:05, Meir Hazon

  • Thanks,

    This is what I’m getting,

    ERROR Unknown argument ‘bridge:br0’

    -This is the command,

    virt-install -n $machinename -r $memory –vcpus=$cpus –os-variant=rhel6 –accelerate -v -w –network bridge:br0 –network bridge:br1 –disk path=/home/vm/$machinename.img,size=100 -l http://172.21.110.213/6.3/ –nographics -x “ks=http://172.21.110.213/KS/$machinename-ks.cfg ksdevice=eth0 ip=172.21.110.248 netmask=255.255.255.0 dns=172.21.110.2 gateway=172.21.110.1 console=ttyS0”

    -The following is working,

    virt-install -n $machinename -r $memory –vcpus=$cpus –os-variant=rhel6 –accelerate -v -w bridge:br0 –disk path=/home/vm/$machinename.img,size=100 -l http://172.21.110.213/6.3/ –nographics -x “ks=http://172.21.110.213/KS/$machinename-ks.cfg ksdevice=eth0 ip=172.21.110.248 netmask=255.255.255.0 dns=172.21.110.2 gateway=172.21.110.1 console=ttyS0”

    -What am I doing wrong?

    Thanks so much,

    Meir

    —–Original Message—–
    From: CentOS-virt-bounces@CentOS.org [mailto:CentOS-virt-bounces@CentOS.org] On Behalf Of Ilya Ponetayev Sent: Tuesday, April 02, 2013 4:20 PM
    To: Discussion about the virtualization on CentOS
    Subject: Re: [CentOS-virt] Can I have more than 1 bridge attached to a KVM

    As far as I know the only way to directly assign real NICs into VM without bridging is to use PCI passthrough, though this way imposes several limitations, mostly in IOMMU / VT-d hardware support.

    But if bridging is acceptable then you can repeat –network bridge: option in virt-install command line several times to create as many NICs inside VM as you want.

    02.04.2013 14:05, Meir Hazon

LEAVE A COMMENT