Skip to content

Instantly share code, notes, and snippets.

@scottslowe
scottslowe / lxc-ovsup
Created January 22, 2014 23:14
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.
#!/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