Linux Containers (LXC) is a userspace interface for operating system-level virtualization features in the mainline Linux kernel, such as kernel namespaces and control groups (cgroups). These allow multiple distinct user space instances to be run on a single kernel.

learn more… | top users | synonyms

10
votes
5answers
11k views

Why doesn't docker container start at boot w/ upstart script on Ubuntu 12.04?

Using instructions for Docker auto-start on Linode VPS running Ubuntu 12.04 and Docker 0.8.1, the specified container does not start on reboot. Once booted, I am able to ~$ sudo start [service-name] ...
1
vote
3answers
277 views

“failed to attach 'veth87VSIJ' to the bridge 'virbr0': No such device”

I am using Fedora 20 in a VM and trying to learn to use containers. I have created a container but can't start it. Here is the terminal output: [root@localhost home]# lxc-start -n test lxc-start: ...
0
votes
1answer
82 views

docker - how to run x desktop in a container?

I'm trying to set up my Linux machine to run multiple guest OSes, one of those being a Windows VM, and another a Linux container. The goal here is to prevent me from messing up the host system, while ...
1
vote
1answer
27 views

Moving LXC container's backing storage

I have a bunch of LXC containers running on a machine. All of them have their rootfs in the default location /var/lib/lxc/*/rootfs. This directory lives on a rather small partition on the host. I have ...
0
votes
3answers
303 views

No qemu-debootstrap in Arch Linux

I just installed lxc in Arch Linux, but the qemu-debootstrap binary seems missing, This command sudo lxc-create -n test -t ubuntu -P /run/shm/1 complains about that. I couldn't find it with either ...
4
votes
1answer
470 views

userns container fails to start, how to track down the reason?

When creating a userns (unprivileged) LXC container on Ubuntu 14.04 with the following command line: lxc-create -n test1 -t download -- -d $(lsb_release -si|tr 'A-Z' 'a-z') -r $(lsb_release -sc) -a ...
1
vote
0answers
136 views

Installing MongoDB in Ubuntu LXC Container. Fails with 'invoke-rc.d: initscript mongod, action “start” failed.'

I can't manage to install mongodb in a Ubuntu LXC container. I've set-up the Ubuntu 14.10 host by following these instructions: https://linuxcontainers.org/lxc/getting-started/ lxc-create --version ...
0
votes
0answers
13 views

How do I edit files in LXC?

I have a Centos 6.6 running on lxc. I would like to edit files using Sublime or Gedit but not as a root user. Presently I do a gksudo editor and then open rootfs folder. Is there a better way of doing ...
5
votes
1answer
877 views

Noninteractive script running over ssh is interrupted as apt-get finishes

When I run the following non interactive script on Ubuntu Server 13.04 it's interrupted when lxc-docker package finishes installation. Script : ssh -o StrictHostKeychecking=no -t -t -i $CERT ...
1
vote
0answers
34 views

Setup public IP address on LXC container

Can anyone tell me how to setup a network interface for each LXC container so that each container can have its own dedicated IP address? Here's what the /etc/network/interfaces file on my host node ...
1
vote
1answer
55 views

How to make a local template for a linux container and point to that

I am a newbie to the world of Linux Containers. I looked at quite a few webpages, wikipedia and checked out the questions at stackexchange but without any answers. Maybe my 'keyword fu' is not strong ...
0
votes
0answers
27 views

Do I need systemd-logind service on server?

I'm setting up debian 8 lxc container on debian 8. And I see a lot of: [FAILED] Failed to start Login Service. See 'systemctl status systemd-logind.service' for details. when the container starts. ...
5
votes
1answer
587 views

SquashFS image as rootfs in LXC

Is it possible to use a SquashFS filesystem as an LXC rootfs? I can mount an ext3 image as a rootfs just by setting lxc.rootfs to the filename, but if it's any other type of image, lxc-start just says ...
2
votes
3answers
424 views

lxc: running virtualbox inside a container

I've install virtualbox inside an lxc container. However when I try to start a VM I get the message: kernel driver not accessible (rc=1909) ....permission problem with /dev/vboxdrv. This obviously ...
0
votes
1answer
72 views

Installing Java JDK in busybox in an LXC container - java/lang/NoClassDefFoundError: java/lang/Object

In a web application I'm developing, users will be able to upload java code and I will need to compile and run that. For security reasons, I'd like to that inside an LXC container, and for footprint ...
13
votes
1answer
8k views

Linux LXC vs FreeBSD jail

Are there any notable differences between LXC (Linux containers) and FreeBSD's jails in terms of security, stability & performance? On first look, both approaches look very similar.
1
vote
0answers
48 views

Shorewall on router keeps blocking apt-get update on virtual guest

I have a dual-IP LXC server with several unprivileged containers configured for three users. Each user has his own bridge: lxcbr0, lxcbr1 and lxcbr2. For efficiency, the host runs apt-cacher-ng. Each ...
4
votes
2answers
407 views

How to create user cgroups with systemd

I use unprivileged lxc containers in Arch Linux. Here are the basic system infos: [chb@conventiont ~]$ uname -a Linux conventiont 3.17.4-Chb #1 SMP PREEMPT Fri Nov 28 12:39:54 UTC 2014 x86_64 ...
1
vote
1answer
29 views

Snapshotting a Linux container in Debian

I know that the command $ lxc-snapshot exists somewhere, but it seems that it's not available on Debian? Forgive my Linux ignorance - but how do I get a hold of this capability? Is there an ...
10
votes
3answers
367 views

What are benefits and downsides of unprivileged containers?

The technical explanation of what is unprivileged container is quite good. However, it is not for ordinary PC user. Is there a simple answer when and why people should use unpriviliged containers, and ...
3
votes
0answers
538 views

How to setup unprivileged LXC container without reboot?

I am writing some bootstrapping scripts, and I can't get usermode LXC containers working on vanilla Ubuntu 14.04 headless without a reboot. Here is what i do. First, I download and install Ubuntu ...
1
vote
0answers
20 views

Debian - System (audio) Settings breaking when starting/stopping LXC

I'm rather new to Linux, recently having to start using it to make something for work (controlling Linux Containers). I'm on debian: $ uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian ...
6
votes
1answer
98 views

What is an unprivileged LXC container?

What does it mean if a Linux container (LXC container) is called "unprivileged"?
1
vote
1answer
51 views

How do I conserve the userns UID/GID mappings when archiving an LXC guest?

I'd like to archive an existing LXC container that has been configured to run as unprivileged LXC container (see this question). How can I conserve all the file system meta-data that is used to store ...
0
votes
1answer
98 views

How can i add network interface to LXC Container

I have a question about Network Interfaces in LXC container: In my container,I have by default these interfaces: ubuntu@u5:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3e:b7:de:91 ...
5
votes
1answer
210 views

Migrate an unprivileged LXC container between users

I have an Ubuntu 14.04 server installation which acts as an LXC host. It has two users: user1 and user2. user1 owns an unprivileged LXC container, which uses a directory (inside ...
1
vote
0answers
42 views

Subordinate GIDs/UIDs with LXC and userns for unprivileged user?

When using userns (via LXC in my case), you assign a range of subordinate GIDs and UIDs to an unprivileged user. See for resources: subuid(5), subgid(5), newuidmap(1), newgidmap(1), ...
2
votes
2answers
561 views

lxc-start: No cgroup mounted on the system

Trying to start a Linux container, I get the following: lxc-start: No cgroup mounted on the system OS is Debian 7.
2
votes
2answers
607 views

cgroups: blkio.weight doesn't seem to have the expected effect

I've got 2 LXC containers with these cgroup settings: lxc.cgroup.blkio.weight = 200 lxc.cgroup.cpu.shares = 200 and lxc.cgroup.blkio.weight = 800 lxc.cgroup.cpu.shares = 800 I have verified in ...
0
votes
0answers
43 views

How can I assign an elastic ip to a container running in ubuntu on AWS?

I have been trying to find a way to have multiple servers running on one ec2 instance with each server having a public static ip addresses. I haven't found anything that would help me solve this ...
4
votes
2answers
693 views

How can I use Skype with lxc?

Under Scientific-linux? https://en.wikipedia.org/wiki/LXC I just want to separate Skype, because I don't trust it. We are using it only to call/chat with people, no file transfers!
3
votes
2answers
306 views

What is a Linux container and a Linux hypervisor?

I looked at the stackexchange site but couldn't find anything. I looked at the wikipedia entry on Linux container https://en.wikipedia.org/wiki/LXC and as well as hypervisor ...
0
votes
1answer
57 views

Could I install both Docker and LXC on the same linux box?

Docker and LXC both has it pros and cons. For instance, LXC could run properly with traditional init service or process but docker couldn't (at this moment).
10
votes
1answer
2k views

What makes systemd-nspawn still “unsuitable for secure container setups”?

This is stated in the man page for systemd-nspawn Note that even though these security precautions are taken systemd-nspawn is not suitable for secure container setups. Many of the security ...
1
vote
0answers
41 views

Dedicate USB hardware to LXC container

Reading the LXC documentation, it seems possible to dedicate the physical network port eth2 to an LXC container with config something like: lxc.network.type = phys lxc.network.link = eth2 I'm ...
7
votes
2answers
3k views

Application updates inside of Docker containers?

Typically on a server, automatic updates of security-related patches are configured. Therefore, if I'm running MySQL 5.5 and a new security patch comes out, Ubuntu Server will apply the upgrade and ...
10
votes
1answer
388 views

Linux: Is there handy way to exec a program binding it to IP-address of choice?

In FreeBSD 4.9 it was very easy to accomplish with just a single command like jail [-u username] path hostname ip-number command if path was / you had running just the same program as usual but ...
15
votes
1answer
3k views

User permissions inside and outside of LXC containers?

I'm running some services inside of Docker LXC containers on my server and I'm beginning to actually do serious things with them. One thing I'm not clear on is how user permissions work inside and ...
0
votes
0answers
420 views

Can a process running in a linux container communicate with another process running on the host OS via IPC?

I have 2 processes A and B. Currently, both A and B are running on the same OS (RHEL6.2) and the processes can intercommunicate via TCP sockets. My objective is to run process B in a Linux Container ...
0
votes
1answer
67 views

How root can make sure that this time sudo will not prompt for password a specific user?

I am writing a script, that will setup lxc on the host, and then configure a container. I want this script to be unattended. After the container is created and run, there is a moment, when I want to ...
1
vote
2answers
298 views

Do all Linux processes write EOF to stdout when they are terminating/have finished terminating?

I'm having trouble with sending shutdown -h 0 to a lxc Debian container (i.e. executing this command in the lxc) with with the python pexpect module (in a python script). In this module the user can ...
0
votes
0answers
1k views

Unable to mount cgroup

I've been searching for a solution to this problem but none was working. I would like to start my LXC container but i need to mount cgroup before. [root@stag-devCentOs ~]# lxc-start -n debianLxc ...
8
votes
2answers
1k views

LXC containers as a sandbox environment

I am currently starting a project evaluating untrusted programs (student assignments) in a secure sandbox environment. Main idea is to create a web app for GlassFish and Java wrapper around lxc-utils ...
7
votes
2answers
2k views

AppArmor profiles in Docker/LXC

I have a Docker container (LXC) which runs MySQL. Since the idea behind Docker is generally "one running process per container," if I define AppArmor profiles targeting the MySQL binary, will they be ...
3
votes
1answer
1k views

USB passthrough for LXC containers

PROBLEM: So I've been trying to get a usb device (primesense - the OEM reference for the Kinect) to passthrough to an LXC container so I can develop without worrying about polluting my stable system ...
13
votes
2answers
8k views

LXC: How do I mount a folder from the host to the container?

I'm trying to mount a folder on the host to an LXC container. The host has a folder /mnt/ssd/solr_data created (this is currently on the root filesystem, but later I'll mount an SSD drive there, so ...
5
votes
1answer
479 views

Is it possible to run a 10.04 or 12.04 or earlier LTS containerized under LXC or Docker on Trusty?

Is it possible to have a vanilla installation of Ubuntu 14.04 (Trusty) and run inside it containerized older Ubuntu versions that originally came with older kernels? For example for 12.04 I'd assume ...
1
vote
0answers
137 views

MIT Shared Memory Extension or MIT-SHM over ssh

I successfully created a privileged lxc archlinux container on an archlinux host with lxc. I set up a static ip via dnsmasq and ssh into it and I use xauth to forward X11. I then call programs like ...
0
votes
0answers
254 views

What problems to expect when running Docker with libcontainer and lxc on the same host?

Simple question. Can I use the lxc userland tools and docker with its new "native" libcontainer in parallel on the same host? I can see how for some scenarios I could benefit from the docker way of ...
4
votes
1answer
665 views

X and xdotool in LXC instead of KVM

So far I am using various xautomation/xdotool scripts in a KVM virtual machine (linux guest) in order to let them do their work and let me work uninterruptedly. I am using a VirtIO disk, but still the ...