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

how to perform precopy memory migration in LXC /LXD so that I can perform live migration from one host to another

how to perform precopy memory migration in LXC /LXD so that I can perform live migration from one host to another?How do I set to precopy migration in CRIU?
Naresh K
  • 77
  • 1
  • 5
0
votes
0 answers

Should docker instances be used on a big VM or on multiple VMs?

Assuming I have a docker image of the following: -Centos (base image) -Tomcat -MySQL Now assume this image will be used by multiple customers/companies. Do I run different instances on a big VM for each client or create a small VM for each customer…
another q
  • 21
  • 4
0
votes
1 answer

how to benchmark containers ? a lot of request, monitor memory and cpu usage

for my bachelor thesis I have to test a handful of containers runtime. Like Docker, Lxc, runC, Rocket and OpenVZ. My test protocol is simple, I never did testing or benchmarking so I am sorry I am a newb :-). Can you tell me if my test is relevent…
beorn
  • 35
  • 2
  • 10
0
votes
1 answer

Cannot use test-kitchen with lxc

I am trying to setup my test-kitchen setup with lxc. Lxc is working fine on my machine and i have tested it. When i try to do kitchen create i am getting following error. -----> Starting Kitchen (v1.6.0) >>>>>> ------Exception------- >>>>>> Class:…
shivams
  • 2,597
  • 6
  • 25
  • 47
0
votes
1 answer

lxc-create stuck at connecting to archive.ubuntu.com

I am new to LXC. I tried to create ubuntu container using the command lxc-create -n onos -t ubuntu The installation ran for some time and got stuck with below message Installing Update Connecting to archive.ubuntu.com I am behind corporate proxy.…
0
votes
2 answers

How to run a Linux distro within an LXC container on Android?

I'm trying to run a Linux distro such as Ubuntu within an LXC container on Android. Ubuntu for Android worked using LXC, but they never released the code.
nohamk
  • 325
  • 2
  • 11
0
votes
1 answer

Other than lxc-info, what other commands can be used to show a container's size?

I'm using LXC container and I know lxc-info shows the memory use, CPU usage, IP address etc, but what command can show the container's size? I know memory use is somehow related with size, but I still want the actual numbers because I want to do a…
Lena
  • 3
  • 3
0
votes
1 answer

SSH authorization in Ansible between local and remote host

I have a Vagrant box with centos 7 where I am creating LXC containers. An Ansible run in the Vagrant box. I create the container with Ansible like this: - name: Create containers lxc_container: name: localdev_nginx container_log: true …
PumpkinSeed
  • 2,945
  • 9
  • 36
  • 62
0
votes
1 answer

Making lldb work inside lxc

I wanted to play with the new lldb since it is supposed to work better on linux and I tried to use it inside a container. Sadly it seems to consider the connection coming from the container ipv4 and not localhost so it rejects it: error: rejecting…
lu_zero
  • 978
  • 10
  • 14
0
votes
1 answer

Remove or detach network phys interface attached to the LXC instance

If I want to attach the network interface to the LXC we can specify it in the lxc config file as lxc.network.type=phys lxc.network.link=eth3 lxc.network.name=eth1 or we can run the below command as part of lxc hook to attach it during lxc-start #…
Viswesn
  • 4,674
  • 2
  • 28
  • 45
0
votes
0 answers

pass /dev/disk to lxc container

Before we used fstab: /dev/disk /var/lib/lxc//rootfs/dev/disk none bind,create=dir 0 0 But after upgrade to lxc 1.1.5 this solution doesn't work. Also if we make parted to create some partitions in host system,…
tantra35
  • 79
  • 7
0
votes
0 answers

Identifying the network namespace of an lxc container

I would like to know the mechanism to identify the network namespace of an LXC container. Basically I am looking for a mechanism to move the interface from the network namespace of an LXC back to the main namespace whenever an LXC crashes. For this,…
pr-pal
  • 3,248
  • 26
  • 18
0
votes
0 answers

Use many PHP version with LXC

I need to have this architecture : I want to switch between different PHP versions with LXC containers. But I don't see how to configure. It is possible ? Ty
0
votes
1 answer

Why won't my container run?

Ubuntu 15.10 Using this run command with the official nginx image: sudo docker run -dit --name="myApp" -p 8181:80 -v /home/username/Documents/My\ Folder/Repos/my-app:/usr/share/nginx/html:ro -v /home/username/Documents/My\…
jstudios
  • 856
  • 1
  • 9
  • 26
0
votes
1 answer

Debugging a C++ program that exits unexpectedly without error on lxc container

I’m trying to build a c++ program in an LXC container. It’s working fine in my ‘build’ container, and if i clone it - still works fine. If I create a new container and install the same build tools it builds fine and installs fine though the program…
Alex Turner
  • 470
  • 1
  • 4
  • 14