Questions tagged [lxc]

LXC is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host. It is sometimes referred to 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 further kernel distibutions.

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

591 questions
6
votes
3 answers

Unable to create lxc container on centos "lxc_container: utils.c: get_template_path: 1128 No such file or directory - bad template: centos"

I am trying to create an lxc container on centos but I am running into the following error: [user@sdn3-lnx-01 ~]$ lxc-create -t centos -n container1 lxc_container: utils.c: get_template_path: 1128 No such file or directory - bad template:…
IP Archer
  • 135
  • 2
  • 9
6
votes
1 answer

LXC with Open vSwitch

I want to try OVS (software Linux switch) http://openvswitch.org/ with my LXC container with Ubuntu as host and guest. So I have installed it: # apt-get install openvswitch-switch Configured according this doc…
ipeacocks
  • 2,187
  • 3
  • 32
  • 47
6
votes
2 answers

Exec is not supported by the lxc driver: how to get around this?

Using Docker on CoreOS, I have a script which calls: docker exec ... This works fine on CoreOS, but I also want to test it on CircleCI. When I try to run that script on CircleCI, I get: time="2015-06-22T01:14:51Z" level=fatal msg="Error response…
alberto56
  • 2,997
  • 3
  • 28
  • 47
6
votes
2 answers

Create an LXC container from a local template (tar.gz)

I'm trying to create an LXC container from a local tar.gz of a rootfs of another container but I could not find any option in lxc-create to do so. I can create a new container, remove its rootfs and replace that with my untared rootfs but this is…
syed
  • 173
  • 3
  • 10
6
votes
1 answer

Is a Docker/LXC container a running app or something in-memory?

I just read the excellent SO question asking "What is the difference between Docker and a VM?". However, the accepted answer left me wanting just a wee bit more. I sort of understand a container (Docker/LXC - I don't get the difference) to use…
smeeb
  • 27,777
  • 57
  • 250
  • 447
6
votes
3 answers

What is the benefit of Docker container for a memcached instance?

One of the Docker examples is for a container with Memcached configured. I'm wondering why one would want this versus a VM configured with Memcached? I'm guessing that it would make no sense to have more than one memcached docker container running…
bhartsb
  • 1,316
  • 14
  • 39
6
votes
3 answers

LXC - Cgroup memory controller: missing

I'm trying install LXC (0.7.4.1) on my Debian 6 but when I run the lxc-checkconfig I get "Cgroup memory controller: missing" root@lxcsrv01:~# lxc-checkconfig Kernel config /proc/config.gz not found, looking in other places... Found kernel config…
André Bolinhas
  • 157
  • 1
  • 2
  • 10
5
votes
1 answer

lxc-start:No container config specified

Installed the lxc container via lxc-create: sudo lxc-create -t download -n dos1 I chose debian buster arm64 and run it: sudo lxc-start -n dos1 -d Outputs an error: lxc-start: dos1: tools/lxc_start.c: main: 290 No container config specified What…
user8788726
5
votes
3 answers

Can I use a socket as stdin/stdout in lxc (linux containers)?

I am interested in starting a daemon inside an lxc container with its stdin/stdout as a socket passed from the host, inetd style. Is this possible?
joeforker
  • 40,459
  • 37
  • 151
  • 246
5
votes
1 answer

How to resize a linux container in proxmox

I'm trying to change an lxc container size in new proxmox 4 on debian jessie. But there is no checkbox (which was in openvz containers) for changing a size from proxmox interface. Changing a size in lxc container configuration file and restarting…
Sergey S.
  • 171
  • 1
  • 2
  • 7
5
votes
1 answer

How do I connect a LXC container to an IP alias?

I currently have 3 IP addresses going to the same server. The /etc/network/interfaces file on the host is as follows: auto eth0 iface eth0 inet static address XXX.XXX.132.107 gateway XXX.XXX.132.1 netmask 255.255.255.0 auto eth0:0 iface…
Sapphyre
  • 53
  • 1
  • 4
5
votes
2 answers

How to mount Docker container volumes to different path?

Container #1 runs with a volume defined for /data, and I'd like to use the run option --volumes-from to mount this volume to another container, but I'd like to change the path for the second container. In other words /data from container #1 should…
thasmo
  • 9,159
  • 6
  • 27
  • 32
5
votes
2 answers

how to mount a folder from lxc

I have the lxc, it has a running application. To edit the code of this application on own computer(Ubuntu 13.10), I want to mount a directory lxc. How can this be done? for example /var/lib/lxc/ubuntu_12_04/rootfs/home/ mounted in /mnt/lxc
Greg Eremeev
  • 1,760
  • 5
  • 23
  • 33
5
votes
4 answers

How to build a web service with one sandboxed Python (VM) per request

As part of an effort to make the scikit-image examples gallery interactive, I would like to build a web service that receives a Python code snippet, executes it, and provides me with the generated output image. For safety, the Python instances…
Stefan van der Walt
  • 7,165
  • 1
  • 32
  • 41
5
votes
2 answers

REST API container create and port bindings

I have image from dockerfile, which setup container, but I need to create and start containers with docker REST API. Problem is that I have issue with exposing ssh port. I have removed EXPOSE from dockerfile, and build image. After that I made…
eXPi
  • 107
  • 1
  • 4
  • 9