[lxc-devel] Regarding lxc-attach and lxc-device commands

vinish ramachandran vinishr at gmail.com
Mon Jun 23 07:00:05 UTC 2014


Hi All,

I have installed the latest lxc version (1.0.3-2) from 'Rawhide' and
created a new container with default template on my fedora-21 machine
    [root at localhost ~]# lxc-ls
    test1

When i try to run "ifconfig" command in my container bash shell it throws
the error
   [root at test1 ~]# ifconfig
   -bash: ifconfig: command not found
   [root at test1 ~]#

so i run the attach command from host machine and again got the following
error
    [root at localhost ~]# lxc-attach -n test1 -- ifconfig
    lxc_container: No such file or directory - failed to exec 'ifconfig'

but "ip link" command works with lxc-attach command.

[root at localhost ~]# lxc-attach -n test1 -- ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode
DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
8: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP mode DEFAULT group default qlen 1000
    link/ether 1a:d2:4f:5d:bd:7c brd ff:ff:ff:ff:ff:ff


Should i do anything extra to get the ifconfig comand to work in container
??

Regarding lxc-device:

>From man page i can see that lxc-device curently supports just "add" device
option.Is the remove option a "work under progress" or the only way to
remove device is to stop the container.


Thanks
Vinish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140623/4ef9f8ce/attachment.html>


More information about the lxc-devel mailing list