Skip to content

Instantly share code, notes, and snippets.

@stajkowski
Created March 2, 2016 00:33
Show Gist options
  • Save stajkowski/02603339e7bc082f300a to your computer and use it in GitHub Desktop.
Save stajkowski/02603339e7bc082f300a to your computer and use it in GitHub Desktop.
udev
Change: /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.script.up = /etc/lxc/ovs_up
lxc.network.script.down = /etc/lxc/ovs_down
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
OVS_UP
#!/bin/bash
BRIDGE="clientbr0"
ovs-vsctl --if-exists del-port $BRIDGE $5
ovs-vsctl --may-exist add-port $BRIDGE $5
echo "$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12" >> /var/log/lxclog.log
OVS_DOWN
#!/bin/bash
BRIDGE="clientbr0"
ovs-vsctl --if-exists del-port $BRIDGE $5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment