Automatically create VLAN bridge interfaces for KVM on RHEL 5-6
This lets us (for example) run a dev VM (inside a dev network) on the same physical VM host as a staging VM (in a separate staging network).
Creating these bridge interfaces requires (each time) creating two network config files (one for an ethernet sub-interface, and one for the bridge), and then starting up both interfaces. It’s time-consuming and error-prone.
While doing some work on optimizing pfSense VMs, I wrote this little script to automate the process of creating bridge interfaces. It’s specific to the interface configuration syntax on RHEL5/6