Questions tagged [lxc]

LXC short for (Linux Containers) LXC is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host. LXC is the userspace control package for Linux Containers, a lightweight virtual system mechanism sometimes described as “chroot on steroids”.

LXC provides operating system-level virtualization not via a full blown virtual machine, but rather provides a virtual environment that has its own process and network space. LXC relies on the Linux kernel cgroups functionality that became available in version 2.6.29 and is now available in all newer kernel versions. Cgroups was developed as part of LXC. It also relies on other kinds of namespace-isolation functionality, which were developed and integrated into the mainline Linux kernel. LXC is similar to other OS-level virtualization technologies on Linux such as OpenVZ and Linux-VServer, as well as those on other operating systems such as FreeBSD jails. LXC Containers can define various cpu limits, memory limits etc. (In short all parameters that can be set via CGROUPS) to prevent any one container from interfering with all other containers running on the same LXC host. LXC uses the linux bridge-utils commands to create local VLANs, and attach containers and physical interfaces to them. With containers the physical overhead (ram, swap space, one kernel per VM, plus hypervisor) that is present in virtualization methods is reduced. With containers, one kernel and one virtual memory space is shared between all the containers running on that host. For a comparison of other Operating System virtualization techniques, see this link

420 questions
13
votes
1 answer

Why use lxc instead of chroot?

One ubuntu server hosts 3 apps all on separate domains. Each app has its own developers. App developers belong to linux "sftp" group. chroot allows password sftp access for each app developer. /home/app1/prod /home/app2/prod /home/app3/prod In…
csi
  • 1,555
  • 7
  • 23
  • 42
12
votes
1 answer

How to create /dev/tun device inside unprivileged LXC container?

This question is similar to No tun device in lxc guest for openvpn . The LXC has evolved and the unprivileged LXC containers were introduced recently that offer another layer of security against breaking the jail. I need to create an OpenVPN server…
Adam Ryczkowski
  • 720
  • 1
  • 9
  • 29
12
votes
9 answers

How to auto-start unprivileged lxc containers?

On Ubuntu 14.04, I have created an unprivileged container that I can manually start and stop. But I would like this to start and stop along with the system. I have added the following to the container's configuration: lxc.start.auto =…
HRJ
  • 225
  • 2
  • 10
12
votes
3 answers

Proper way of handling LXC containers on btrfs

Lets say we have one server with lxc installed, and a lxc container used for as a base img /var/lib/lxc/ubuntu_base. For simplicity let's forget the config changes after copying the base img. some people suggest using subvolumes and snapshots for…
zidarsk8
  • 394
  • 1
  • 3
  • 12
10
votes
3 answers

LXC container not starting

My CentOS LXC containers are not starting anymore on an Ubuntu 14.10 machine. I think that the problem started after a reboot, but I am not sure. I had a similar problem after an yum update, when the init scripts were replaced with stock ones that…
Mircea Vutcovici
  • 17,619
  • 4
  • 56
  • 83
10
votes
3 answers

Why are applications in a memory-limited LXC container writing large files to disk being killed by the OOM?

EDIT2: This problem appears to exist as well under 3.8.0-25-generic #37-Ubuntu SMP EDIT: I modified the question from the original title of "Why would the Linux Out of Memory manager be triggered by writing to a file with dd?" to better reflect that…
UsAaR33
  • 1,096
  • 3
  • 11
  • 20
10
votes
1 answer

Can I use a different linux distribution in an LXC container?

We are developing a server product targeted for Debian Lenny (and some others). However, due to driver needs, developers' personal choices etc. we run Ubuntu (12.04) on the hardware. Is it possible to run Debian Lenny in an LXC container on Ubuntu…
Michael
  • 285
  • 4
  • 16
9
votes
6 answers

LXC, Port forwarding and iptables

I have a LXC container (10.0.3.2) running on a host. A service is running inside the container on port 7000. From the host (10.0.3.1, lxcbr0), I can reach the service: $ telnet 10.0.3.2 7000 Trying 10.0.3.2... Connected to 10.0.3.2. Escape character…
Roberto Aloi
  • 575
  • 2
  • 5
  • 14
9
votes
2 answers

Bridging LXC containers to host eth0 so they can have a public IP

UPDATE: I found the solution there: http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge#No_traffic_gets_trough_.28except_ARP_and_STP.29 # cd /proc/sys/net/bridge # ls bridge-nf-call-arptables bridge-nf-call-iptables …
Vianney Stroebel
  • 91
  • 1
  • 1
  • 3
9
votes
2 answers

Limit memory and cpu with lxc-execute

I would like to isolate processes using lxc-execute. Is it possible to set bandwidth, cpu and memory limit? I had a look in the man of lxc.conf but I did not find it exhaustive.
rtacconi
  • 745
  • 4
  • 14
  • 28
9
votes
3 answers

Explain in Plain English what is LXC and for what it is useful

What is LXC? For what it is useful? What are the differences between LXC and common virtualization?
Daniel Cukier
  • 823
  • 1
  • 10
  • 18
9
votes
3 answers

use LXC under heavier virtualization (Xen, KVM,Hyper-V,VMVare)

Is it possible to use LXC under heavier virtualization (Xen DomU, KVM, Hyper-V, VMVare) ? I would like to use it as security (isolation) tool, the ability to limit resource consumption is not priority for me. I am only interested if it can be done…
Stepan
  • 2,139
  • 3
  • 15
  • 8
9
votes
3 answers

Why LXC when there is linux-vserver?

I am no LXC expert, but as far as I know it is really similar to linux-vserver. If that is correct, I wonder why there is another player in the already crowded virtualization camp? What does LXC provide (or promise) that linux-vserver doesn't…
Luke404
  • 5,826
  • 4
  • 47
  • 58
8
votes
2 answers

How to prevent docker-compose appending hashes to created container names?

I have a server with several lxc containers. In some of the containers there is a docker installed. Usually a docker compose action in these LXC containers results in container names with the format appname_service_1, e.g. wordpress_app_1 and…
simonszu
  • 373
  • 7
  • 14
8
votes
1 answer

Do I need a CPU that supports Virtuallization to do Containerization?

I've read that Containerization is cheaper than virtualization; I know that containerization uses less resources than virtualization since there's only one OS involved and no virtualized hardware. But do I need a CPU that supports virtualization to…
leeand00
  • 4,869
  • 15
  • 69
  • 110
1
2
3
27 28