我已经建立了运行在LXC中的Juju,并试图将它暴露到内部网络中。我通常按照这的问题来指出lxc到我现有的桥(eth-br0
)。
我根据文章编辑了/etc/default/lxc
和/etc/lxc/default.conf
,但是当我尝试引导时,我得到:
2013-09-26 19:47:05 INFO juju.provider.local environprovider.go:32 opening environment "local"
2013-09-26 19:47:05 ERROR juju.utils network.go:37 cannot find network interface "lxcbr0": net: no such interface
2013-09-26 19:47:05 ERROR juju.provider.local environprovider.go:48 failure setting config: net: no such interface
2013-09-26 19:47:05 ERROR juju supercommand.go:282 command failed: net: no such interface
error: net: no such interface
显然,有些东西仍然试图指向lxcbr0
,而不是现有的桥。如果我只想向网络公开一个lxc,这是最好的方法吗?我应该如何正确地配置它。
如有必要,我可以附上我的ifconfig
。
发布于 2013-10-09 06:49:04
你是对的,有些东西正试图指向lxcbr0。
在这些文件中使用lxcbr0
我尝试了br0,它给了我同样的错误。在将现有的桥改为lxcbr0之后,我工作得很好。
发布于 2014-07-02 09:18:03
在yaml环境中,最新版本的juju包含一个用于指定网络桥的选项:
# network-bridge holds the name of the LXC network bridge to use.
# Override if the default LXC network bridge is different.
#
#
network-bridge: br0
希望这能帮上忙?
发布于 2014-12-13 12:48:32
查看您通过以下方式拥有的接口:
ifconfig
我的结果是:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:600 (600.0 B) TX bytes:600 (600.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:7239 errors:0 dropped:0 overruns:0 frame:0
TX packets:8727 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:931464 (931.4 KB) TX bytes:1701016 (1.7 MB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:198.46.159.94 P-t-P:198.46.159.94 Bcast:198.46.159.94 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
所以我的网络接口是venet0。我编辑我的. .juju/environments.yaml s.yaml如下:
local:
type: local
network-bridge: venet0
保存它之后,跑:
巨菊靴
您可以通过以下方法查看它是否在运行:
居居地位
这是我的结果:
environment: local
machines:
"0":
agent-state: started
agent-version: 1.20.14.1
dns-name: localhost
instance-id: localhost
series: trusty
state-server-member-status: has-vote
services: {}
https://askubuntu.com/questions/350503
复制相似问题