4

当我尝试从主机终端登录 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网络!如何手动修复它以及为什么会发生此错误!

4

3 回答 3

5

当我升级到 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 似乎依赖它。也许为此目的有更好的可执行文件?

让我知道这是否适合您!

于 2014-04-28T20:29:16.223 回答
5

如上面csl的指针,您必须单独安装 openvswitch 控制器。在 ubuntu 中,这对我有用:

sudo apt-get install openvswitch-testcontroller
sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller
于 2016-08-18T17:51:01.407 回答
2

更简洁的安装方法是使用 Ubuntu 软件包升级。这将使 OVS 的未来升级和删除更容易。一个例子是http://gregorygee.wordpress.com/2013/10/24/another-way-to-upgrade-open-vswitch-in-mininet/

如果您从源代码安装 Open vSwitch 并希望将其删除,则只需返回源目录并运行“make uninstall”。

顺便说一句,我发现如果您在从源代码安装之前没有在系统上安装 Open vSwitch,则 Open vSwitch 安装将不包含系统启动脚本,因此您必须手动安装它们。最好尝试使用打包脚本安装 Open vSwtich。

于 2014-04-29T01:41:11.057 回答