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
2
votes
0 answers

Process Management vs Containers

What is the foremost advantage (if there is any at all) of isolating/encapsulating a Microservice in a container while it can be deployed through a process manager such as PM2? To make the question clearer and more meaningful, assuming a service…
Arnold Zahrneinder
  • 4,788
  • 10
  • 40
  • 76
2
votes
0 answers

What are the risks to exclude lxcfs folder from ubuntu server backup?

I'm making full Ubuntu 18.04 server backups with rsync, which has no permission to copy files from lxcfs folder. I understand it has something to do with virtualisation, which I'm not consciously using. However, I've got several Docker and Snap…
2
votes
1 answer

Docker inside LXC unprivileged container

I am trying to run Docker containers inside LXC unprivileged container. Can anyone suggest what am I missing? If I remove apparmor from the LXC container it works fine. Seems like I need to do some apparmor magic to make it work without disabling…
2
votes
1 answer

No lxc-clone found on system

I see some tutorials on the Internet use lxc-clone. But on Void Linux (lxc 3.14) or compiling from sources, there is no lxc-clone to be seen. Was it removed or is the a replacement?
mwarning
  • 721
  • 5
  • 22
2
votes
0 answers

Docker on LXC - rm file: failed to register layer: Error processing tar file(exit status 1): operation not permitted

I have a rather simple Dockerfile FROM python:3.6-slim-stretch COPY files.zip /tmp RUN \ apt-get update && \ apt-get install -y unzip && \ apt-get -y autoremove && \ apt-get clean && \ mkdir -p /app/data && \ unzip…
Dušan Maďar
  • 9,269
  • 5
  • 49
  • 64
2
votes
1 answer

lxc-start: controller: lxccontainer.c: wait_on_daemonized_start: 842 Received container state "STOPPING" instead of "RUNNING"

when i run the config file config file sudo lxc-start -n controller -d it gives me this error lxc-start: controller: lxccontainer.c: wait_on_daemonized_start: 842 Received container state "STOPPING" instead of "RUNNING" lxc-start: controller:…
2
votes
1 answer

Why the management containers don't receive IP-s when installing with OpenStack-Ansible?

For testing purpose, I want to install OpenStack on two VirtualBox instances using Ansible. As the documentation says, I pre-configure local network with four VLAN-s. And create a bridge interfaces. The network connectivity is fine after that. I…
Roman
  • 116
  • 1
  • 4
2
votes
1 answer

Selenium in lxc container; WebDriverException: Message: invalid argument: can't kill an exited process

I'm trying to use Selenium in an Ubuntu 18.04(amd64) LXC container. Selenium version 3.14.1, firefox version 62.0.3, Python 2.7 I installed geckodriver-v0.22.0-linux64.tar.gz from https://github.com/mozilla/geckodriver/releases into /usr/local/bin…
BenB
  • 41
  • 5
2
votes
1 answer

I'm still confused by Docker containers and images

I know that containers are a form of isolation between the app and the host (the managed running process). I also know that container images are basically the package for the runtime environment (hopefully I got that correct). What's confusing to me…
u84six
  • 4,604
  • 6
  • 38
  • 65
2
votes
0 answers

Container for threads process isolation

I want to know if is possible to customize an LXC kernel (or relation system like OpenVZ, etc) to work just for threads process, see this mention: Unlike Docker, Virtuozzo, and LXC, which operate on the process level, LVE is able to operate on…
Imylor
  • 384
  • 1
  • 9
2
votes
0 answers

Permission denied for creating cgroup while starting an lxc container

Step for creating cgroup for the user: sudo service cgmanager start sudo cgm create all $USER sudo cgm chown all $USER $(id -u $USER) $(id -g $USER) cgm movepid all $USER $PPID Trying to start a container: lxc-start -n hola -P…
edem
  • 3,222
  • 3
  • 19
  • 45
2
votes
1 answer

Dump file outside the lxc container

I am able to view syslog of my lxc container, from outside the container... by; sudo lxc exec my-abc-container -- /root/tail /usr/local/var/syslog or either by tailing it sudo lxc exec my-abc-container -- /root/tail --follow=name…
Anum Sheraz
  • 2,383
  • 1
  • 29
  • 54
2
votes
0 answers

Empty lxc core dump

Good day. I cannot achieve getting core dump file of any process launched from lxc container. Here are my settings (inside container): $ cat /proc/sys/kernel/core_pattern /var/crash/coredump-%e.%p $ ulimit -c unlimited $ ls -lha…
2
votes
1 answer

Redmine 3.2.1-2 ob Ubuntu 16.04 breaks on apt upgrade

I have the following setup: Ubuntu 16.04 lxc/lxd host machine running several lxc containers One container runs Redmine 3.2.1-2 on Ubuntu 16.04 guest OS, with Rails 5.0.1 and Bundler 1.13.6 The Redmine database in on an other lxc database…
alfred
  • 91
  • 6
2
votes
2 answers

SSH-less LXC containers using Ansible

I am new to ansible, and I am trying to use ansible on some lxc containers. My problem is that I don't want to install ssh on my containers. So What I tried: I tried to use this connection plugin but it seams that it does not work with ansible…