I'm switching from OpenVZ to lxc. The one thing that is really bugging me is that I can't find a lxc alternative to vzctl exec
. Before on OpenVZ I could do vzctl exec 1033 restart nginx
. Now, all I can figure out to do is either run sshd in every container or use lxc-console, and I don't like either option (the first is too much management overhead, the second is too much of a hassle).
Have you tried
lxc-attach
instead? According the documentation,Example to list all folders inside
home
of the containerIf no process is defined, it creates a new shell inside the container.