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

104 questions
9
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
  • 409
8
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
  • 713
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
6
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
  • 161
6
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
  • 861
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…
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…
4
votes
2 answers

Increase the LXD/LXC Btrfs loop file storage pool size

Our production container crashed because its LXC storage pool is out of space. Here is dh -h from inside the container: Filesystem Size Used Avail Use% Mounted on /dev/loop0 82G 78G 2.0G 98% / Here the same mount from the host…
exebook
  • 372
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
  • 742
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
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
  • 101
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…
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
  • 553
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
  • 773
3
votes
2 answers

Forcing Ping to Egress When Destination Interface is Local (Debian)

I am running a Debian-based Linux container under Proxmox 4.4. This host has five network interfaces (though only two come into play in the problem I'm having). While I am shelled into this host, I ping the IP address associated with eth1. What is…
Dave
  • 1,129
1
2 3 4 5 6 7