Created
January 22, 2014 23:14
-
-
Save scottslowe/8569424 to your computer and use it in GitHub Desktop.
This script can be used to automatically attach LXC instances to Open vSwitch (OVS) on startup. You'll need to call this script from the container's configuration using the "lxc.network.script.up" configuration parameter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BRIDGE="br-int" | |
ovs-vsctl --may-exist add-br $BRIDGE | |
ovs-vsctl --if-exists del-port $BRIDGE $5 | |
ovs-vsctl --may-exist add-port $BRIDGE $5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment