lxc-attach: unrecognized option '--namespaces' #49

cust0m opened this Issue Apr 1, 2013 · 12 comments


None yet
4 participants

cust0m commented Apr 1, 2013

When I try "vagrant ssh", I get the message below

DEBUG subprocess: stderr: lxc-attach: unrecognized option '--namespaces'
DEBUG subprocess: stderr: Usage: lxc-attach --name=NAME

Execute the specified command - enter the container NAME

Options :
  -n, --name=NAME   NAME for name of the container

Common options :
  -o, --logfile=FILE               Output log to FILE instead of stderr
  -l, --logpriority=LEVEL          Set log priority to LEVEL
  -q, --quiet                      Don't produce any output
  -?, --help                       Give this help list
      --usage                      Give a short usage message

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

See the lxc-attach man page for further information.

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1
 INFO retryable: Retryable exception raised: #<Vagrant::LXC::Errors::ExecuteError: There was an error executing ["sudo", "lxc-attach", "--name", "e8481d38d3fc", "--namespaces", "NETWORK", "--", "/sbin/ifconfig", "-v", "eth0"]

fgrehm commented Apr 1, 2013

Which version of lxc have you got? (you can check it with lxc-version)

cust0m commented Apr 1, 2013

version 0.7.5


fgrehm commented Apr 1, 2013

Ok, tks for reporting this issue.
I've got 0.8.0-rc1 down here but I'll try to get my hands on 0.7.x to see if I can fix it.


fgrehm commented Apr 1, 2013

@vicpfarias I believe I've got a fix for this one, expect a new version with it soon ;-)

@vicpfarias, if you're using ubuntu precise, you can easily get a newer lxc by enabling the precise-backports repository and forcing the install of a newer version with:

sudo apt-get install lxc=0.8.0~rc1-4ubuntu39.12.10.2~ubuntu12.04.1

You should take the string after the = from the Version key in the output of apt-cache show lxc.

@fgrehm fgrehm closed this in a9c4745 Apr 10, 2013


fgrehm commented Apr 10, 2013

@vicpfarias this should be fixed on 0.3.0, please note that you'll need to get the new base box in case you need to recreate a container over there. Please let me know if you still have issues.

i have the very same problem, but with current versions:

% vagrant -v
Vagrant version 1.2.2
% lxc-version
lxc version: 0.8.0-rc1

oh and:
% vagrant plugin list
vagrant-lxc (0.3.4)


fgrehm commented May 13, 2013

@mschirmacher this is weird, what distro are you running up there? I was previously using the same lxc version you got on my laptop with Ubuntu Quantal and things were just fine =/

im running debian testing/sid. When i noticed i cant get into the container using vagrant ssh i tried lxc-attach to gain access and i stumbled accross another bug in the debian package of version 0.8: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708144 .
Im not sure how both bugs are connected :-/


fgrehm commented May 14, 2013

@mschirmacher the only place we need lxc-attach is to fetch container's IPs and there is already a "not so pretty" mechanism to configure the LXC driver object to look into dnsmasq leases for lxc < 0.8. I'm going to fix the "ip fetching code" and write a "step-by-step guide" on a wiki to configure a debian host for vagrant-lxc usage as soon as I have a chance
I'm reopening the issue in order to keep track of this

@fgrehm fgrehm reopened this May 14, 2013


fgrehm commented Jul 29, 2013

Closing in favor of #118 and #121

@fgrehm fgrehm closed this Jul 29, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment