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
4
votes
3 answers

What is the difference between lxc commands lxc start and lxc-start, etc?

Its not clear from the documentation what is the difference between lxc start and lxc-start and the --help provides different usages and switches. Tutorials use both variants but delving into the documentation a bit deeper, it seems that lxc-start…
LeanMan
  • 474
  • 1
  • 4
  • 18
4
votes
1 answer

Install and create a Kubernetes cluster on lxc proxmox

I would like to know who tried to install and create a Kubernetes cluster inside LXC proxmox. Which steps should I follow to realize that?
user10083504
4
votes
3 answers

I can't get env var in the Docker container

I've ran my Docker container using this command: docker run --name test1 -d -e FLAG='***' rastasheep/ubuntu-sshd Now, when I connect to it via SSH, I can't get my env there via printenv FLAG. How can I fix this? When running with -it and sh, I can…
Dmitry Sharshakov
  • 678
  • 1
  • 6
  • 7
4
votes
0 answers

What is the boot(start) process of the Docker container?

I'm studying about Docker. As I know, there are difference between Docker Container and OS in booting process.(Booting process of Docker container doesn't contain kernel execution) I think this is how the Docker container starts. Use libcontainer…
서형준
  • 54
  • 4
4
votes
1 answer

can i create a LXC image from my own custom OS?

Am new to lxc. I want to create my own lxc containers from existing OSs(my own unix kernel compiled in different architecture). I am trying to use "lxc-create". Can anyone suggest me how to create my own containers and is it possible to create one…
4
votes
3 answers

LXD/LXC gid mapping

I have a directory on disk that is owned by share with gid of 1001. I want to add that directory as a device on one of the lxc containers, and have that group to carry over. I have tried using raw.idmap 'gid 1001 1001' but the lxc container won't…
Vitaly Babiy
  • 6,114
  • 4
  • 26
  • 24
4
votes
2 answers

lxd (ubuntu 16.10) container mac address

I am running the latest Ubuntu (16.10) with LXD containers. Containers are configured with bridged networking, and they receive their own IP addresses from the DHCP server. I have configured them with the following: lxc profile device add default…
bytebybyte
  • 53
  • 1
  • 7
4
votes
0 answers

How to use apparmor inside lxc container?

I have lxc container 'foo' created with ubuntu template in: /var/lib/lxc/foo/. I have file a.out in /var/lib/lxc/foo/rootfs/home/ubuntu/test/ (or /home/ubuntu/test/ as visible from inside container). I would like to use apparmor to prevent a.out…
4
votes
1 answer

migrating lxc to lxd

I've looked all over, but can't see if there is a way. I have a couple LXC containers running Ubuntu 14.04 on top of a Ubuntu 14.04 Host. They've become pretty important to me, so I want to be able to easily backup / migrate the LXC containers to…
Mark
  • 41
  • 1
  • 5
4
votes
2 answers

LXC: Is there a way to setup nameserver on container config?

Is there a way to setup nameserver on LXC container config? It seems like it's not ideal to modify /etc/network/interfaces inside a (Ubuntu) container when you want to setup a static ip. So I naturally guess that there is probably a way to setup…
kojiwell
  • 872
  • 1
  • 10
  • 10
4
votes
1 answer

Where are core files stored in a lxc container?

When I am running code on a container it cores I am not able to locate it on my container(or the core file is not being stored). ulimit -c is set to unlimited /proc/sys/kernel/core_pattern is set to |/usr/share/apport/apport %p %s %c %P (what is…
ajax_velu
  • 286
  • 3
  • 16
4
votes
1 answer

Running docker Ubuntu image on Debian environment

Just started using Docker and have some questions regarding linux containers. How can I run Ubuntu images on a Debian host? Or it is just a name of image called 'Ubuntu' that actually use Debian environment? # cat /proc/version Linux version…
dima.h
  • 860
  • 2
  • 10
  • 14
4
votes
1 answer

lxc container can't use nfc usb device

I have been trying to use libnfc in a lxc container running debian wheezy. Having tried several things and libraries, thus justifying the lxc way, I finally reached a point where I don't know where to look. The problem is that the hosts sees my usb…
Martin
  • 141
  • 4
4
votes
2 answers

Resizing Docker containers

I am trying to see if size of each docker container can be limited through some configuration. Following this , I am able to increasing the size of a running container from 10G. Can I shrink it? Trying to shrink threw an error saying online…
Nataraj
  • 379
  • 7
  • 18
4
votes
1 answer

How do I pass the host's IP address to my container in Docker

I have multiple NICs on my machine and hence multiple externally routable IP addresses. When I start a container, I want to make the container's virtual eth0 have the IP address of one of my publically visible IP addresses This is because each of my…
user3871397
  • 81
  • 1
  • 2