You are not logged in.
I need some lightweight full-featured containers on my desktop machine. After some investigation on the topic I went with LXC.
I took me a while to understanding why User Namespaces are turned off in the kernel (https://bugs.archlinux.org/task/36969) and saw people experiencing issues even if kernel is built with this feature turned on (https://bbs.archlinux.org/viewtopic.php?pid=1476124). So I went with privileged mode.
I've tried to create an 'sshd' container, but it didn't want to start up complaining that '/etc/init.d' was missing. No surprise here, we've moved to systemd.
So I ran:
# lxc-create -n foo -t archlinux
After some while it installed the system.
Next, need to log in to that machine via tty:
# lxc-console -n foo
First surprise. All my xkb mappings (defined in .xinitrc as `setxkbmap -layout ...`) were turned off. Nothing in dmesg.
Same if you `shutdown` guest machine. Audio volume is also reset.
Second. There doesn't seem to be an option to just detach from that tty. Even if you kill terminal emulator, you need to:
# lxc-stop -n foo
# lxc-start -n foo
and then login again.
PPS After some ^C's during container creation, I now see incomplete containers that cannot be removed:
# lxc-ls
git2 plamo
[root@tp ~]# lxc-destroy -n plamo
lxc-destroy: Error: plamo creation was not completed
Container is not defined
It's also impossible to stop running container:
[root@tp ~]# lxc-start -n git2
lxc-start: failed (98) to create the command service point /var/lib/lxc/git2/command
lxc-start: ##
lxc-start: # The container appears to be already running!
lxc-start: ##
lxc-start: failed to initialize the container
lxc-start: The container failed to start.
lxc-start: Additional information can be obtained by setting the --logfile and --logpriority options.
[root@tp ~]# lxc-stop -n git2
Hangs forever (almost, I haven't checked forever actually just yet).
Kill only works with -9.
PPPS
# su - newlycreateduser
su: failed to execute /bin/bash: Permission denied
Turns out that / has 750 permissions. Changing to 755 helped.
Why is it 750 by default? Don't even tell me about security, I'm running this thing as root on host, and I had to use root on guest machine too.
PPPPS
Bridging doesn't work out of the box. Furthermore, I'm connected via wlan, and it doesn't seem to be an easy task at all to set up bridge to wlan0.
Should these be reported upstream?
Last edited by pirj (2014-12-06 14:16:11)
Offline