[lxc-users] lxc-attach vs lxc-console

Fajar A. Nugraha list at fajar.net
Mon Oct 5 05:32:11 UTC 2015


On Mon, Oct 5, 2015 at 4:42 AM, Andrew Davidson <andrew at amdavidson.com>
wrote:

> I am a very new user of LXC, and I have not been able to ascertain when I
> should be using lxc-attach vs lxc-console. Googling does not seem to have a
> solid answer.
>
> Are there any cases where it is better or worse to use one or the other?
>
> lxc-attach seems much more convenient and practical, but I wanted to make
> sure I wasn’t mis-using it and would end up with a trashed host system.
>
>
lxc-attach -> you directly get a root session inside the container, no
password asked. Similar to what you get if you have passwordless key-based
ssh setup.

lxc-console -> you get a virtual console for the container, complete with
its login screen. Similar to what you get if you have console setup (e.g.
using ILO, DRAC, whatever) to a real server. If you attach to console 0
(lxc-attach -t 0), you'll get to see all console messages during boot as
well.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151005/c5555d3a/attachment.html>


More information about the lxc-users mailing list