您的位置:首页 > 大数据 > 人工智能

ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed

2016-05-11 09:41 573 查看
重装好ovs后直接操作一切正常,但是重启虚拟机后会出现:

ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed (No such file or directory)

ovs-vsctl exited with code 1

* Error connecting to ovs-db with ovs-vsctl

Make sure that Open vSwitch is installed, that ovsdb-server is running, and that

“ovs-vsctl show” works correctly.

You may wish to try “service openvswitch-switch start”.

无法正确添加ovs

原因是:ovs 需要 the ovsdb, ovs-vswitchd, ovs-vsctl, 但是关机后它们会默认关闭

所以解决方法是每次重新开机都运行(run as root):

ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
--pidfile --detach
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: