[Lxc-users] lxc-attach command options

Goran Cetusic goran.cetusic at gmail.com
Tue Nov 16 13:05:50 UTC 2010


I tried it without the quotes first, but lxc-attach thinks -i is an option
for lxc-attach not the command I'm trying to execute.


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.

On Tue, Nov 16, 2010 at 1:33 PM, Daniel Lezcano <daniel.lezcano at free.fr>wrote:

> On 11/16/2010 12:41 PM, Goran Cetusic wrote:
>
>> After successfully patching the 2.6.35.8 kernel with
>> http://lxc.sourceforge.net/patches/linux/2.6.35/2.6.35-lxc1/ I finally
>> managed to attach to a container shell.
>> Everything seems to be working, except I have no idea how to run a command
>> with options.
>> One of the programs I need to run is tcpdump
>>
>> lxc-attach -n n0 "/usr/sbin/tcpdump -i eth0"
>>
>>
>
> Did you try without the quotes ?
>
>  Running tcpdump without the options works fine.
>> But with options I get the following error
>>
>> lxc-attach: No such file or directory - failed to exec '/usr/sbin/tcpdump
>> -i
>> eth0'
>>
>> I have no idea if it's the code not supporting options or just me.
>> Also, are there plans to implement the lxc-attach functionality in the
>> kernel?
>>
>>
>
> Yep, it's on the way, it should be merged soon.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20101116/7ad01a4e/attachment.html>


More information about the lxc-users mailing list