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
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,...
4
votes
0answers
97 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 ...
4
votes
0answers
1k 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 ...
4
votes
0answers
215 views

To what extent does LXC manage configuring the network interface in a container?

In the LXC config file we can specify an IP address for a container: lxc.network.type=veth lxc.network.link=br0 lxc.network.ipv4 = 10.1.0.35/16 lxc.network.flags=up lxc.network.hwaddr= 00:16:3e:24:26:...
3
votes
0answers
24 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? ...
3
votes
0answers
134 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 ...
3
votes
0answers
273 views

LXC with both GUI apps and snapshots on unmodified Fedora kernel

I am looking for a tool or library to run LXC that supports: running X applications conveniently snapshotting root filesystems (using a Fedora system with an unmodified kernel), so that I don't have ...
3
votes
0answers
87 views

LXC: Have rootfs mounted without nosuid

I have the container's rootfs in a volume mounted with the nosuid option. When I start the container, its / mounted is then also mounted nosuid, which breaks programs such as sudo. How can I avoid ...
2
votes
0answers
68 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 ...
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
0answers
49 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
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 ?
2
votes
0answers
78 views

What is “state-object” in cgroups

I am gathering some idea about lxc, kernel name spaces and cgroups. While reading man lxc-cgroup, i find : lxc-cgroup gets or sets the value of a state-object (e.g., 'cpuset.cpus') in the ...
2
votes
0answers
105 views

Moving a whole server into docker instance (or LXC)

It seems to work, to move an existing install into a virtual machine. Is it possible to move a whole Debian server into a docker instance inside the same machine? I would like to get a docker that I ...
2
votes
0answers
101 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 ...
2
votes
0answers
533 views

Vagrant-lxc container not starting

Firstly I'd like to say that I'm new to LXC and I may have some problems getting the right idea of how the things should work. The thing is I'm trying to start a previously download vagrant-lxc box ...
2
votes
0answers
89 views

LXC apparmor profile limits executing scripts in /run/*

LXC is blocking a trusted container from running scripts in /run/*, how do I configure LXC to allow scripts to run here?
2
votes
0answers
328 views

Network in LXC not forwading through a bridge

I've got an LXC container, on the host I've got a bridge between the LXC container and eth0. The LXC container can ping it's Host 10.1.0.5, but can't ping the gateway of 10.1.0.2. The host is able to ...
2
votes
0answers
3k views

Using a bridge, an LXC container can't ping router, but the host OS can

I've got a virtual machine running under virtualbox, and in that virtual machine I've got an LXC container I'm trying to bridge to virtualbox's NAT interface: ------------- ----------- -----...
1
vote
0answers
17 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 ...
1
vote
0answers
23 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 - ...
1
vote
0answers
50 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 ...
1
vote
0answers
70 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 ...
1
vote
0answers
87 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) ...
1
vote
0answers
78 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 ...
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 ...
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
0answers
80 views

Implement network bridge as userspace program?

I am looking to do some packet filtering/address rewriting for packets which are coming from and going to a lxc container. After some basic research, I figured the best way to do this is to assign a ...
1
vote
0answers
523 views

Trouble installing Unity8-LXC on Mint

(I originally posed this on askubuntu but was told it should be here instead.) I want to install unity8-lxc on Linux Mint so I can check out Unity8 without installing it. Mint 17.3 (Rafaela) of ...
1
vote
0answers
206 views

LXC mount CIFS => permision denied

I'm trying to mount a shared folder /disk from local network with cifs to folder test, but I get permission denied. I can ping 192.168.1.x. So what's the problem with LXC?
1
vote
0answers
146 views

Move lxc container to a different host

I'd like to know, if it is possible to move a lxc container from one lxc host to a different one. Here are the specs of the machines: Current LXC host: Gentoo: Linux 3.7.10-gentoo #1 SMP x86_64 ...
1
vote
0answers
196 views

Possible to install 32-bit LXC container in 64-bit host with multilib support?

Is it possible to run a 32-bit LXC container (i.e. x86_32-based) on a 64-bit host (i.e. x86_64-based)? Does it work at all? What precautions may I have to take to make this work? My kernel would ...
1
vote
0answers
22 views

Is an unprivileged LXC where the host user itself is mapped to 0 less secure of one where one of its subids is mapped to 0, and why?

Instead of creating "common" LXC unprivileged containers where all the users are mapped to (unprivileged) subuid/gid of my host user, I'm considering a mapping where my host user itself will be mapped ...
1
vote
0answers
40 views

how to tell lxc to not use /usr/share/lxc/templates for making a linux container

This is a follow-up question to How to make a local template for a linux container and point to that Now, in that it seems that a user has to make some changes to /usr/share/lxc/templates in order ...
1
vote
0answers
130 views

Default lxc networking suddenly stops to work

I've recently installed lxc on ubuntu 14.04. Networking used to work (lxcbr0 being a NAT interface, DHCP configured using dnsmasq) but after a container restart, the networking does not work any more. ...
1
vote
0answers
12 views

How would I get the preprocessed configuration of an LXC guest?

So LXC is installed, guests configured and working, but how would I extract information from the effective LXC configuration of a single guest? Now the naive approach is obvious. Take the output of $(...
1
vote
0answers
29 views

A way to set parameters in the LXC parent cgroups

So I have LXC installed, guest containers configured and all. The LXC containers each go into their own submodule (in cgroup parlance) and each are configured with cpu.shares and also the memory they'...
1
vote
0answers
129 views

Linux Container LXC Intra Host Networking Issues

I have a problem that I cannot seem to resolve. I have two hosts M and N. A container in host M can ping the gateway, its host and all containers in Host N but cannot ping any co-hosted container in ...
1
vote
0answers
223 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
0answers
183 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 ...
1
vote
0answers
57 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 3.2.63-2+...
1
vote
0answers
1k 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 ...
1
vote
0answers
591 views

Making an Android container with Ubuntu 12.04 on the Samsung ARM Chromebook : initrd file not found

I'm trying to run Android as guest OS with LXC containers on Ubuntu 12.04 LTS on the ARM Chromebook, reading this tutorial. At some point of the tutorial, it says: Then get the initrd for your ...
1
vote
0answers
238 views

Containers running on ARM

I've been doing some research and decided to implement OpenVZ since it allows each container to be isolated from other containers, unlike LXC. However, OpenVZ is still not supported for ARM ...
1
vote
0answers
158 views

benchmarking ftp in 3 methods of virtualization

My Bachelor Final Project is about benchmarking visualization methods with ftp, web and mysql services: installing Debian on xen (para-visualization) kvm and lxc with equal resources config (equal ...
1
vote
0answers
240 views

vi hangs when run in /dev/console under LXC

I'm running an Arch Linux container from within lxc. The lxc-start command connects to the internal /dev/console, on which I have agetty running using the following command: /sbin/agetty --noclear -a ...
1
vote
0answers
103 views

lxc-unfreeze does not resume the guest if the host is rebooted

Does a guest that has been frozen with lxc-freeze survive a reboot of the host? I.e. after rebooting the host, can the guest be unfrozen with lxc-unfreeze?
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
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 ...