<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Hi all.<br><br>A few years ago there was a thread about executing a command inside a running container [1].<br>It sounded like <br><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div><span class="sender pipe"><span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">Dominik Schulz</span></span></span> <span class="date"><span itemprop="datePublished" content="2010-01-30T08:08:10-0800">Sat, 30 Jan 2010 08:08:10 -0800</span></span> <pre>Hi, I'm fairly new to LXC and I am looking for a way to execute a command inside a running container (a full blow one with its own rootfs and full isolation). lxc-execute doesn't seem to do the trick and lxc-console requires credential to login. I'm looking for a way to execute command w/o having to login via ssh or the lxc-console, so I can execute command directly inside the containers to shut them down properly.</pre></div></blockquote> The final answer was [2]<br><pre><blockquote style="border: 1px solid rgb(204, 204, 204); padding: 7px; background-color: rgb(245, 245, 245);"><div>...<br>Moving an existing process into an existing, populated namespace will likely never be possible. -serge</div></blockquote>It was four years ago.<br><br>But how about nowadays? <br>Is it possible now, since we have a new system call setns(2), which looks like does exactly necessary thing?<br><br>--<br>Regards, Christian.<br></pre><br><pre></pre><br><br><br><br>[1]: https://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00070.html<br>[2]: https://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg00134.html<br></div></body></html>