Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've set up Juju running in LXC, and I'm attempting to expose it to the internal network. I'm generally following this question to point lxc to my existing bridge (eth-br0).

I've edited /etc/default/lxc and /etc/lxc/default.conf as per the post, but when I try to bootstrap I get:

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

Obviously something is still trying to point to lxcbr0 rather than the existing bridge. If I just want to expose a lxc juju to the network, is this the best way to do it and how should I configure it properly.

I can attach my ifconfig if necessary.

share|improve this question

3 Answers 3

You are right something is trying to point lxcbr0.

Use lxcbr0 in these files

  1. /etc/default/lxc
  2. /etc/lxc/default.conf
  3. /etc/network/interfaces

I tried br0 it give me the same error. After changing existing bridge to lxcbr0 that I worked fine.

share|improve this answer
    
While thats true that using the default works, my original question is how do I change the bridge to something else. I have an existing bridge on a NIC that I need to point LXC to. –  user187595 Oct 11 '13 at 21:46

The latest version of juju includes an option in the environments yaml for specifying the network bridge:

# network-bridge holds the name of the LXC network bridge to use.
# Override if the default LXC network bridge is different.
#
#
network-bridge: br0

Hope this helps?

share|improve this answer
    
What version supports network-bridge option ? can you specify ? –  user1868 Oct 26 at 15:14

See which interface do you have by:

ifconfig

my result is like this:

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

So my network interface is venet0. I edit my .juju/environments.yaml as below:

local:
    type: local
    network-bridge: venet0

and after saving it, run:

juju bootstrap

You can see if it's running or not by:

juju status

This is my result:

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: {}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.