当我尝试从主机终端登录 SSH 到我的 mininet VM 时,它显示 Permission denied 错误 甚至在使用命令托管 Mininet 的 VM 终端内:

sudo mn --topo single,3 --mac --switch ovsk --controller remote`

它显示以下错误:
ubuntu@ubuntu:~$ sudo mn
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
Cannot find required executable ovs-controller.
Please make sure that it is installed and availabe in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin/:/bin)
ubuntu@ubuntu:~$

所以我不能继续使用SDN网络了!
如何手动修复以及为什么会发生此错误!

最佳答案

当我升级到 Open vSwitch 2.1 时,我遇到了完全相同的问题。
在 ovs (NEWS) 的发行说明中,我发现了这一点:

  - ovs-controller has been renamed test-controller.  It is no longer
     packaged or installed by default, because too many users assumed
     incorrectly that ovs-controller was a necessary or desirable part
     of an Open vSwitch deployment.

我也在test-controller(源码分发)下找到了./tests/test-controller,所以就试了下
sudo cp tests/test-controller /usr/bin/ovs-controller

这对我来说很好用!我也在使用 Mininet 2.1,但我必须执行上述操作才能使其正常工作。
这是输出:
$ sudo mn --controller=ovsc
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
*** Starting 1 switches
s1
*** Starting CLI:
mininet> pingall
*** Ping: testing ping reachability
h1 -> h2
h2 -> h1
*** Results: 0% dropped (2/2 received)
mininet>

有趣的是,他们不鼓励使用 test-controller ,甚至 Mininet 似乎依赖它。也许为此目的有更好的可执行文件?

让我知道这是否适合您!

关于ubuntu - Mininet OVS-Controller 无法加载和运行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21687357/

10-09 08:44