Questions tagged [lxc]

LXC short for (Linux Containers) LXC is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host. LXC is the userspace control package for Linux Containers, a lightweight virtual system mechanism sometimes described 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 newer kernel versions. 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

100 questions
8
votes
5 answers

LXD containers and networking with static IP

I have done some Docker testing over the years, but for a specific kind of testing, I need a little more then just application containers. So I turned to LXC/LXD containers, which is great. After installing LXD I created my own container: >>…
Willem
  • 399
  • 1
  • 7
  • 17
8
votes
1 answer

Docker in Proxmox

I've setup a home server with Proxmox v4 and want to run a Docker container. How should I go about this? Should I just setup Docker inside an LXC container or should I create a full VM and use one of the minimal OS's like Atomic Host / CoreOS /…
GeneBean
  • 215
  • 3
  • 9
7
votes
2 answers

Syntax for setting LXD Container raw.idmap

I'm following the procedure for mounting a host drive inside an lxc container as described here. In that article the author sets the raw.idmap like this: lxc config set zesty raw.idmap 'both 1000 1000' I want to customize the mapping for gid and…
Millhouse
  • 703
  • 4
  • 11
5
votes
2 answers

How to detect an LXC container system is ready?

I am attempting to start a LXC container and then run a command inside it. The problem is that even if the container is in RUNNING state, it has not completed all its boot. This produces trouble with /tmp (and, I guess, wit other…
anumi
  • 151
  • 4
5
votes
2 answers

htop memory usage does not add up with process list

I am using lxd to run multiple containers and having trouble reporting the memory usage: both htop and free shows high memory usage but the list of processes that uses memory is very short and doesn't add up to the reported usage. From the bare…
user60177
  • 71
  • 1
  • 3
4
votes
0 answers

How to create LXC templates?

I am trying to create an LXC template but I cannot find any documentation on what commands and options the script minimally needs to support. Is this in fact documented somewhere? The built-in templates seem rather complex and figuring out what I…
goertzenator
  • 480
  • 4
  • 8
4
votes
1 answer

How to create a linux container which inherits the hosts root file system, possibly with zfs?

What Hopefully the question in the title makes sense. I am wanting to create a low overhead (therefore no virtual machine) copy of the host operating system, with it running in a linux container. I am thinking of somehow using zfs to create a…
hak8or
  • 722
  • 1
  • 6
  • 17
4
votes
3 answers

Copy files from LXC to host machine

I'm new to containers. I have a LXC container running on a remote linux machine. All I found online is how to copy files from host to LXC container. But how can I copy files from a running LXC container to the host, and eventually to my own…
Tina J
  • 579
  • 1
  • 7
  • 21
4
votes
1 answer

How to run openvpn in a LXC container inside debian host?

I am running debian stretch on my host and I try to configure openvpn inside an Ubuntu xenial LXC guest. Because openvpn needs a tun device, I followed guides such as http://heider.io/blog/2013/10/26/openvpn-in-a-lxc-container/ to allow tun device…
omega
  • 91
  • 2
  • 7
4
votes
3 answers

Unable to do 'yum install' inside LXC container on CentOS 7

I am trying to create CentOS container inside CentOS 7 and host my application. But I am unable to install anything inside container. If I do 'yum -y install nodejs' i got below error Loaded plugins: fastestmirror Loading mirror speeds from cached…
sudheer KB
  • 41
  • 1
  • 5
4
votes
2 answers

Using MySQL and LxD over Btrfs

I have a Ubuntu 16.04 workstation, with an ext4 filesystem. When playing with LxD, I would like to have a lightening-fast snapshoting ability (since my images would usually be big). This ability, in my understanding, would be achievable only if the…
Harry
  • 779
  • 1
  • 12
  • 28
4
votes
1 answer

no CUDA-capable device is detected inside LXC container

I followed the following instructions and read the official guide in detail in order to set up Cuda inside an LXC container. When I try to execute the sample ./deviceQuery script from the official sample codes I get a PASS in the host. However when…
Greg
  • 473
  • 1
  • 5
  • 11
3
votes
3 answers

How do I export a lxc container?

Is it possible to export a lxc container to another machine? There are some tools like lxc-snap and lxc-clone will those help in exporting to another system? Can I copy paste the rootfs folder or is there a standard way of doing this?
Nishant
  • 735
  • 1
  • 11
  • 25
3
votes
1 answer

does the host system manage the sockets created by processes running in LXC containers?

I'm new to using LXC and I couldn't find an answer to this question. In a scenario where we have multiple containers running on the same host, and they're connected to a bridge which connects them to the LAN. Does the host still manage the sockets…
KLD
  • 33
  • 2
3
votes
2 answers

lxd-type container static IP in profile

I am trying to set a static IP address in an lxd container. The container is made with: nonroot $ lxc launch images:centos/7/amd64 my_centos in a pretty bogstandard lxd (just the default apt-get install lxd; service lxd start) environment. Now I…
Willem
  • 399
  • 1
  • 7
  • 17
1
2 3 4 5 6 7