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

5
votes
1answer
802 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 /home/user1/.local/......
2
votes
1answer
29 views

Create LXD containers on machine with no internet connection

Server: Ubuntu 16.04 Server, x64, no internet connection I have LXD installed but am having trouble getting an image to that server to use as a baseline for containers. I have tried two options so ...
0
votes
1answer
812 views

SSH to Linux Container from Other Machine

I am trying to learn about Linux Containers and this is my first encounter with servers, ssh and many other things that I do not know the terms yet. I create five different containers and authorized ...
1
vote
0answers
16 views

How to reflect changes made to original LXC container on overlayFS snapshots?

In order to make updates easier and limit there size, I created a base LXC container, let's say c1, where i installed and configure a few default packages (using apt) which are common to all my ...
3
votes
0answers
23 views

Ctrl+Alt+F6 to access a linux container?

By default, Ctrl+Alt+F1-F6 lead to a virtual console. A lxc container is running on my computer. How to configure the host so that Ctrl+Alt+F6 goes to the virtual console of the container? ...
1
vote
0answers
22 views

LXC: shared folder in guest machine doesn't work as expect

Host machine has the following dirs: /srv/releases/A/db/DB1/ /srv/releases/A/db/DB2/ /srv/releases/A/files/ /srv/releases/B/db/DB1/ /srv/releases/B/db/DB2/ /srv/releases/B/files/ /srv/current - ...
5
votes
2answers
4k views

Building unprivileged (userns) LXC container from scratch, by migrating a privileged container to be unprivileged

How can I build a privileged LXC (1.0.3) container (that part I know) and then migrate it successfully to be run unprivileged? That is, I'd like to debootstrap it myself or adjust the lxc-ubuntu ...
18
votes
5answers
20k 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 I'...
2
votes
1answer
38 views

LXC container gets two IP addresses assigned to it

I'm playing around with LXC on my Arch Linux workstation as a learning experience. I'm following the guide on the LXC page on the Archwiki and setting up a static ip for the container. This is what my ...
1
vote
1answer
52 views

Set up DHCP for LXC containers

I have several lxc containers that need network access. At the moment I am manually allocating them IP addresses in the relevant config file as so: lxc.network.type = veth lxc.network.flags = up lxc....
1
vote
1answer
40 views

What is the correct way to start a container with a given command?

I want to create a set of containers for simulating network traffic. Inside each of the containers, I would like to set a different network delay. Right now I am doing it manually using this command, ...
1
vote
0answers
47 views

fail to log from my app through rsyslogd in a linux container

Running an archlinux container on an archlinux host, both using rsyslog with the same configuration file: $ cat /etc/rsyslog.conf # Minimal config $ModLoad imuxsock # provides support for local ...
0
votes
1answer
44 views

Why would a container not be bridged to the local network by default?

From my understanding on container technology (like lxc or docker), when you create a container it by default uses a "private network" like 10.0.1.x. I do not understand why you would not want it on ...
0
votes
1answer
63 views

Can I run NixOS in an LXC container?

Can I run NixOS in an LXC container? To run debian on top of debian, one would use LANG=C SUITE=jessie MIRROR=http://httpredir.debian.org/debian lxc-create -n debian8 -t debian What should one ...
1
vote
1answer
27 views

Docker container on Red Hat Linux server 5.9

Can I install Docker on Red Hat server 5.9 so I can take an image container from an installed software and move it to another server? Or should it be enough to update the Kernel up to version 3 so ...
5
votes
2answers
3k views

How to assign an additional IP/hostname to a chrooted environment?

While I can simply have e.g. sshd in a chroot environment ("chrootenv") listen to a different port than its parent ("parentenv"), it would be more convenient to have that environment have an ...
1
vote
1answer
66 views

What is the network connection speed between two containers communicating via a virtual bridge running on the same host?

Does a virtual bridge (added to /etc/network/interfaces) limit the transfer speed of data from the memory of one lxc/docker container to another? For example does the memory throughput drop to that ...
1
vote
1answer
57 views

bridge-routing and martian packets

i am experimenting with routing a bit, and now i have a problem i cannot solve by myself eth0 | | ...
6
votes
2answers
1k 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 ...
7
votes
1answer
5k 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
0answers
69 views

Weird behaviour of unprivileged LXC container

Can someone please explain this weird behaviour to me: I have an unpriviliged LXC container with firefox inside. If firefox is running on the host outside of the container, /usr/bin/firefox inside ...
2
votes
0answers
66 views

I have trouble analysing the cause of this (firefox) segfault

When executed within a minimal (unprivileged) LXC container, firefox segfaults (other graphical applications work fine). I'am unable to find the exact cause of this segfault (which is most likely due ...
1
vote
1answer
349 views

How to install graphic capabilities to CoreOs?

I would like to install CoreOs as a base on my desktop machine. Then, I could launch some containers, with eventualy a graphical environnement. So I have to add all the graphic stack: GPU drivers, ...
34
votes
1answer
23k 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.
0
votes
0answers
20 views

Vagrant LXC mounts small /tmp partition

I've got a vagrant box running with an ubuntu based LXC container. I had to run a script that uses /tmp to store some files temporarily. The script kept failing, having looked at what's up, it turned ...
0
votes
0answers
29 views

lxc-how to make an lxc container available on the LAN?

I have tried a lot of methods mentioned on the internet,including the debian wiki, and a lot of other sources.But they all end up either not fully completing what i want to do, or taking out the host ...
0
votes
1answer
64 views

How can I list all connections to my host, including those to LXC guests?

I tried both netstat and lsof, but it appears it's not possible to see the connections to my LXC guests. Is there a way to achieve this ... for all guests at once? Essentially what throws me off ...
0
votes
0answers
19 views

How to autostart an lxc container in a custom directory?

I want to keep my LXC containers outside of var (preferably in /srv). When my LXC container is in /var/lib/lxc, it autostarts by setting a flag in config, but when I lxc-init -P is/srv/dir`, it ...
5
votes
1answer
295 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), user_namespaces(7)....
0
votes
0answers
37 views

Disk usage for a mounted drive shows up completely between the host and a container

When comparing the disk usage for a mounted harddrive the usage is completely different when compared between the host and the container. I am running Ubuntu 14.04 on the host and in the lxc container....
5
votes
0answers
56 views

LXC: Any security difference between root and end-user owned unprivileged containers?

I intend to use LXC containers to isolate most of the network facing services. As per my understanding, I have mainly two ways to do this: Create unprivileged containers owned by root. In this case,...
0
votes
1answer
439 views

LXC Bridge not working on ubuntu 15.04

I'm trying to get lxc containers running with a bridged network connection so the container get ip addresses like the host does from a dhcp server. I red several tutorials, but I couldn't find one ...
4
votes
0answers
96 views

How to bind an lxc container to a specific bridge?

I created a specific bridge br1 and would like to bind a specific container cont1 to that bridge. I have lxc and lxd installed, if that matters (I am not sure what the difference between them really ...
1
vote
0answers
85 views

How to start a service upon an lxc container start?

I would like to start OpenVPN automatically upon the launch of its lcx container. The container runs Ubuntu 14.04.4 LTS, service openvpn start is successful (when launched from the running container) ...
0
votes
0answers
34 views

Auto-assign free static IP address from a range to a container (veth)?

In the config-file of an individual LXC container, one can specify a static IP address so the inside of the container does not need to acquire an IP by DHCP. Is there a way to automatically assign ...
2
votes
0answers
33 views

How to map a UID to another UID (!= 0) inside a user namespace?

How can one map UID 1000 to another regular UID (not root/0) inside a user namespace? EDIT: For anyone interested, https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html lists an ...
2
votes
1answer
115 views

Installing collectd hangs in debian jessie in LXD, I need help finding out why it stalls

I am trying to install collectd using apt-get install collectd in debian jessie. It always hangs at the same place, after setting up ca-certificates it will reach "Setting up collectd" and then ...
3
votes
0answers
132 views

Sharing unix sockets across unprivileged lxcontainers

I have two unprivileged containers and I'd like to share a unix socket between them. Each container has its own user on the host, complete with separate subuid and subguid mappings. I've tried ...
1
vote
0answers
73 views

Why does LXC-create returns error “sudo.conf should be 0”?

I try to create an unprivileged container and nothing works as expected. Here is my code : follows that tutorial #!/bin/bash sudo apt-get update sudo apt-get dist-upgrade sudo apt-get -y install ...
27
votes
2answers
14k views

What is the difference between Docker, LXD, and LXC [closed]

What is the difference between Docker, LXD, and LXC. Do they offer the same services or different.
0
votes
1answer
196 views

LXC ip allocation using DHCP

I'm trying to set up DHCP for my lxcontainers without using lxc-net. The reason for this decision is that I'd like to place my containers in different networks, such that they are unable to talk to ...
1
vote
0answers
29 views

Why I can not update Linux core in dockers?

When I run apt-get update && apt-get upgrade in container, the core is not starting to update. Yes, I know, containers use the kernel of host machine and can not execute some ...
3
votes
3answers
2k 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 ...
7
votes
3answers
5k 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 GNU/...
1
vote
0answers
86 views

NFS permissions across multiple LXC VM's

I recently changed my home server setup from a basic Ubuntu Server installation running everything to a virtualised environment. I am currently running ProxMox type 1 hypervisor, with several VM's. ...
1
vote
1answer
92 views

How do I make changes to an lxc template?

I normally create containers with: lxc-create -n mycontainer -t debian However I want to bake a few items into that "debian" default template. New user with my ssh key, can sudo without a ...
4
votes
1answer
40 views

LXC: Are downloaded templates verified?

Debian 8.3, LXC 1:1.0.6-6+deb8u2 When LXC downloads the base packages for a Debian container, are the packages verified? Verifying a Debian CD involves comparing signed checksum files against the ...
2
votes
0answers
48 views

SSH/web servers in Linux containers improve security?

Scenario: A 'gateway' machine functioning as a router and firewall, connecting a small LAN to the internet. The machine also runs a webserver (hosting a simple website) and an SSH server, providing (...
2
votes
2answers
490 views

Container lockdown

I was reading about LXC vs OpenVZ and was wondering if this issue has already been solved in more recent updates: OpenVZ has done quite a good job at this, but LXC still has issues here. Even ...
2
votes
0answers
92 views

How to calculate LXC load average

How I can calculate or fetch LoadAverage from LXC container? (/proc/loadavg has load from physical server not from vm) Any ideas ?