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
3
votes
1 answer

Build and run a development environment with Docker

We are trying to create a Docker container which will host and run our webapp (mainly written in PHP with Symfony2). For the moment, the container embeds all the application code, cloned when building the image (through a Dockerfile). The app runs…
arnaud.breton
  • 2,054
  • 1
  • 24
  • 39
3
votes
0 answers

Handling groups of key, value pairs while parsing lxc container file with python

I have lxc configuration file looking like ini/prop file but it contains duplicate key-value pairs that i need to group, I wish to convert in dict and json, here is the sample: lxc.tty = 4 lxc.pts = 1024 lxc.rootfs =…
hardcode
  • 53
  • 1
  • 7
3
votes
3 answers

Root PID of Docker container

How can I find the external PID of the root PID inside a Docker container - that is, the one that has PID 1 inside the container? docker ps doesn't seem to display that information.
Robin Green
  • 32,079
  • 16
  • 104
  • 187
3
votes
1 answer

how should I run android in a linux container (lxc)?

I'd like to test android apps on my system without a slow emulator. Is it possible to run android in another linux host, like gentoo or ubuntu? How would one acomplish this, maybe trough docker? In case of gentoo, are there specific kernel modules I…
Jappie Kerk
  • 1,257
  • 12
  • 16
3
votes
0 answers

Linux Container on Android without Root

Is it possible to start a linux container on a android device without rooting the device? If so, what would be the best way to go about that? Any hints would be very much appreciated!
John A.
  • 238
  • 1
  • 2
  • 9
3
votes
2 answers

lxc-start: Invalid argument - failed to clone

Complete newbie trying to get my feet wet on docker, so maybe I am doing something obviously wrong. I am having trouble running a container: root@tethys:~# docker run ubuntu ls lxc-start: Invalid argument - failed to clone lxc-start: failed to…
blueFast
  • 41,341
  • 63
  • 198
  • 344
3
votes
1 answer

Restarting vs Building a Container on Docker

I have some difficulties understanding when to restart a container and when to build a new one. Imagine I have a webapp whose data I give to a container (over a symbolic link which point to the current deploy). Now I have two options when a new…
verbit
  • 485
  • 8
  • 16
3
votes
1 answer

Why containers network throughput is low

I created a couple of containers using Dockers and measured the network performance by means of Netperf. However the throughput results to be quite low, around 563.81 Mb/s. Isn't the communication between 2 containers/processes done through main…
gtato
  • 400
  • 2
  • 11
3
votes
0 answers

Can I reuse the packages install on host OS in LXC guest OS?

I found that LXC is really light weight environment, which I would like to use. However, figured I have to reinstall every package that I want to use in guest environment. I am wondering if I can reuse the packages installed on the Host OS inside my…
Manish Sapariya
  • 3,575
  • 3
  • 25
  • 34
3
votes
2 answers

why libvirtd fails to create vm with internal error 'cpuacct', 'devices' & 'memory' cgroups controllers must be mounted?

To try out LXC on CentOS 6.4 host, I followed the steps in http://wiki.centos.org/HowTos/LXC-on-CentOS6, but it fails with ERROR: internal error 'cpuacct', 'devices' & 'memory' cgroups controllers must be mounted, when install vm using…
3
votes
1 answer

S3FS inside LXC containers mounted by the host

I'm currently using several LXC containers to isolate other users' programs from the host system. The rootfs of each container uses a union file system and a few mount-binds from the host and everything is working correctly. Now I want to be able to…
jlhawn
  • 373
  • 1
  • 3
  • 8
2
votes
0 answers

'LXC launch' gives 'Error: Failed instance creation'

Trying to run this: ros@ros-Virtualbox:/$ sudo lxc launch -p row ubuntu:20.04 turtlebot Creating turtlebot Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Failed getting root disk: No root device…
Alex
  • 21
  • 1
2
votes
1 answer

How to fix docker storage-driver=overlay2 problem

I need to change the underlying storage for a Proxmox LXC Debian Buster container from RAW to ZFS. For this I restored a snapshot to ZFS storage. This is normally transparent for the OS in the container, but in this case docker no longer starts. The…
Dokbua
  • 213
  • 3
  • 12
2
votes
3 answers

LXC containers on host's lan

My LXC containers usually work with a masqueraded bridge, on a private network. This time I would like to put the containers on the host's LAN, but I can't get any results. I use LXC 2.0.7-2+deb9u2 on debian, and I refer to this documentation :…
lc63
  • 25
  • 1
  • 4
2
votes
0 answers

Error: TIOCGPTPEER required but not available linux | lxc

I am getting Error: TIOCGPTPEER required but not available when I execute lxc exec container bash. I am using debian9 stretch root@test-api:~# uname -a Linux test-api 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1+deb9u1 (2020-06-07) x86_64…
wajahat021
  • 91
  • 2
  • 12