[lxc-devel] Regarding lxc-attach and lxc-device commands
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Jun 23 13:34:53 UTC 2014
Quoting vinish ramachandran (vinishr at gmail.com):
> 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'
Presumably you need to provide the full path
> 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
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list