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

420 questions
8
votes
3 answers

Technology for short-lived private VMs

I'm trying to build a system that will run short-lived (CI and test builds) of software components, it's mandatory according to my requirements that each live on a private host. I'm taking that definition to include paravirtualsation options as…
Lee Hambley
  • 360
  • 3
  • 12
8
votes
2 answers

Is LXC secure enough for VPS hosting?

Right now I'm using Linux VServer for VPS hosting. But it's lacking some functionality I need (ex. cpu usage virtualization, quota support for guests, etc.) so I'm thinking about switching to OpenVZ or directly to LXC. I somewhere read LXC is not…
gucki
  • 818
  • 2
  • 11
  • 29
7
votes
1 answer

Why are cgroups (blkio serviced bytes) and iotop producing diverging results

I work with lxc user space tools on ubuntu 14.04 and I want to perform some stress tests and benchmarking within a container. I know that free and htop are not working properly in a container. I am using dd and bonnie++ within a container to stress…
7
votes
3 answers

Accessing LXC container's filesystem from host

I'm looking for a way to access the container's rootfs from the host. While I could just use the directory that was passed to lxc.rootfs, it doesn't have the mounts that the container has, so there are just empty directories instead of the mounts.…
Pavel
  • 191
  • 1
  • 1
  • 6
7
votes
2 answers

Running linux containers (lxc) on ubuntu to isolate web server processes (ruby/thin)

I am trying to setup a server where I would be running multiple apps. Mostly internal but could also be open source projects like Redmine. They would all be Rails/Ruby apps/test scripts running on headless browsers. In essence, I am trying to setup…
Vagmi Mudumbai
  • 183
  • 1
  • 7
7
votes
2 answers

LXC instances do not have IPv4 addresses

I've had limited success in having LXC instances acquire an IPv4 address. It has worked at creation, but if I reboot the host, all addresses are lost. Host Ubuntu 21.10 Client version: 4.21 Server version: 4.21 Image Ubuntu 21.10 tgl@electra:~$ lxd…
Terry G Lorber
  • 667
  • 2
  • 9
  • 14
6
votes
1 answer

Cannot port forward with UFW on Ubuntu

I am trying to get port fowarding to work to expose a LXC container, when using ufw on Ubuntu, but to no avail. I have constructed the following workflow from guides around the Internet ([1][2][3]); most notably the section about…
taifwa
  • 223
  • 3
  • 9
6
votes
2 answers

What is the difference between containers and virtual machines?

I want to comprehend all that differ a container from a virtual machine. A filesystem with all operational system can be observed for both of these virtualization methods. But in a Docker container, e.g. centos 5.x, if I exec uname -a in container's…
6
votes
3 answers

Copy lxd containers between hosts

I've installed lxd on two ubuntu hosts that can only communicate via an intermediate server (on which I don't have su privileges). I've created a container on my localhost and now wish to load the container on the remote server. I consulted the…
0_0
  • 343
  • 1
  • 3
  • 11
6
votes
2 answers

No network connectivity in the LXC container set up in the "routed" mode

I'm experimenting with lxc/lxd in Vagrant, but i'm quite new to it. I managed to create running container, but I cannot ping anything (including 8.8.8.8) from inside of it. I can ping its IP from my top-level non-virtual system, but it refuses SSH…
Łukasz Zaroda
  • 117
  • 2
  • 11
5
votes
1 answer

unprivileged_userns_clone no such

I am trying to setup unprivileged LXC containers as explained in Debian Wiki on a Jessie Debian physical server (4.9.135 kernel). Hence, I want to enable the userns namespace: sysctl kernel.unprivileged_userns_clone=1 sysctl: cannot stat…
philippe
  • 2,303
  • 4
  • 32
  • 53
5
votes
2 answers

lxd container: port forwarding like docker

Is there a way to do port-forwarding in lxd-containers like docker does? I heard some rumours that there is no easy way. According to the homepage of lxd this is their goal: Intuitive (simple, clear API and crisp command line experience) For me…
guettli
  • 3,591
  • 17
  • 72
  • 123
5
votes
1 answer

IPv6 Neighbor Discovery/Routing Failing for Kernel 3.10

Stupid mistakes led to all of this, read Update 5 Intro I'm trying to setup a Linux Router (LXC, 3.10.0-123.el7.x86_64) with IPv6. The provider is Hetzner and I got 2 subnets, one /56 and a /64. They have setup the routing to my LL Address and my…
5
votes
2 answers

How to migrate a regular LXC container to a Proxmox LXC container?

How do you migrate a regular LXC container (from another or the same server) to a Proxmox LXC container, which can be accessed via the Proxmox web GUI? For example, I have a container created by running: lxc-create -n debian8 -t debian -- -r…
ChrisW
  • 181
  • 1
  • 1
  • 7
5
votes
1 answer

Make LXC containers directly accessable with ipv6

First off I have a special IPv6 address allocated to my dedicated server, just 1. A ::1/128 one. But I can assign addresses to eth0 (eg ::2/128, ::3/128, etc). Now I would like to run LXC containers on that server but I would like them to be first…
harm
  • 181
  • 1
  • 1
  • 11
1 2
3
27 28