[CentOS] weird issue with qemu-kvm network...

James Hogarth james.hogarth at gmail.com
Sat Feb 2 01:12:26 UTC 2013


>
> What i did in terms of network changes was the following script. It's an
> old one i used when i didn't work with virsh, because i followed an old
> tutorial for kvm-qemu on CentOS 5.
> It basically creates a new bridge called bg0, creates a tap0 interface,
> and connects eth0 and tap0 to the bridge.

Err no... That's a terrible way to go about this.

It's very not rhel and pretty flakey at best.

You can do everything you need to in /etc/sysconfig/network-scripts/ifcfg-*

Specifically you need ifcfg-br0 (or something similar) with type=Bridge
(the capital B is important) this is where you should configure the network
fit you physical host too.

Then in your ifcfg-eth0 you link that to the bridge.

For VMs you can then see this in virt-manager when building hosts and
libvirt will automatically create appropriate vnetX virtual interfaces to
bind to the bridge.

This is off the top of my head whilst suffering insomnia so double check
with the upstream documentation ;-)

If you need bonding or vlans it becomes more complicated ;-)



More information about the CentOS mailing list