ubuntu

Running qemu + openvswitch on ubuntu 14.04

Commands

$ wget http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-i386-disk.img
$ sudo apt-get install uml-utilities qemu-system-x86 bridge-utils openvswitch-switch -y

$ cat <<EOF >>ovs-ifup 
#!/bin/sh

switch='br0'
/sbin/ifconfig $1 0.0.0.0 up
ovs-vsctl add-port ${switch} $1
EOF
$ cat <<EOF >> ovs-ifdown 
#!/bin/sh

switch='br0'
/sbin/ifconfig $1 0.0.0.0 down
ovs-vsctl del-port ${switch} $1
EOF

如果出现

Device ‘tap’ could not be initialized

那么可能是脚本没有 x 权限,用下面这个命令搞定。… 查看详细