Libvirt Bridged Setup
Being fond of different automatic setups when things just work after a bit of manual tweaking, i decided to let OpenSolaris go to the home network, i.e. have a nice 192.168.1.x address from my Linksys router and access the internet as if it was a regular machine.
After reading this, I’ve spent a couple of moments trying to create a network definition that could simply bridge vnet{something} to my ethernet card. I got some iptables rules added but no real effect. Until I read Bridge to LAN carefully. I should have just specified the name of the bridge in VM configuration instead of a global one. Phew.
So if you want to do this kind of setup, first (on a Ubuntu system) create
bridge definition in /etc/network/interfaces
like
And in your vm configuration file simply attach the virtual ethernet to the bridge:
Yep, libvirt adds another level of configuration that could be easily performed in your own scripts, but I just tired to maintain my own set of scripts that perform the same functions as libvirtd does.