4

I am running a simple application container using the following command:

lxc-execute -n container_name -- sleep 100

For listing all containers we have lxc-ls command and for seeing active containers we have lxc-ls --active command. But both of them does not give any output. Whereas lxc-info -n container_name gives all the relevant information about the container. Can anybody sort out why this lxc-ls command not listing containers?

P.S. I am using ubuntu 14.04 and lxc 2.0.0.

Anwar
  • 76,649

1 Answers1

0

Seems that you are using privileged containers, so you should use sudo with your lxc-ls commands:

sudo lxc-ls -f
OpenITeX
  • 123
  • 1
    I tried but it doesn't work. Can you see into this. – B V Avinash Nov 14 '16 at 04:13
  • It looks like there was a problem with up gradation. So please dont upgrade to avoid any kind of errors. – B V Avinash Nov 25 '16 at 09:39
  • Your comment does not say which upgrade u did, but I'm quite certain that to be able to list privileged containers, one only need to do "sudo lxc-ls -f", but if that does not work then u maybe have.problems somewhere else in the system,,e.g in the sudoers file etc. – OpenITeX May 04 '17 at 21:43