[lxc-users] Nested containers (cont'd)
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Apr 10 20:52:49 UTC 2014
Quoting Nels Nelson (nels.n.nelson at gmail.com):
> Serge, et al,-
>
> I was able to get the inner container started after I did two things.
>
> First, I set this option in every container config:
>
> lxc.mount.auto = cgroup
Excellent.
> Second, I create the directory /lib/var/lxc in each container in which I
> created another nested container.
>
> There is still a strange issue where starting a nested container with a
> command like bash fails to put me into a functioning console. The inner
> container seems to work at first, but then hangs when a command is entered.
>
> # lxc-create -n outer -t minimal
> # lxc-start -n outer -- bash
> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
> bash: no job control in this shell
> bash-4.2# mkdir /var/lib/lxc
> bash-4.2# lxc-create -n inner -t minimal
> bash-4.2# lxc-start -n inner -- bash
> bash: cannot set terminal process group (-1): Inappropriate ioctl for device
> bash: no job control in this shell
> bash-4.2# ls
> <seems to hang><enter key>
> lxc-start: Input/output error - failed to read
> <seems to hang>
>
> To work-around this, I had to start each container as a daemon, and without
> a bash command.
>
> # lxc-start -n outer -d
> # lxc-attach -n outer -- bash
> bash-4.2#
>
> And then that weird "cannot set terminal process group (-1): Inappropriate
> ioctl for device" error stopped showing up.
That's expected. If you want to just run a shell, use lxc-execute.
-serge
More information about the lxc-users
mailing list