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

How to set DHCP IPs of standard LXC containers?

When you create some containers on a host, e.g.: sudo lxc-create -n container1 -t ubuntu sudo lxc-create -n container2 -t ubuntu the LXC system creates IP address for the hosts on a new subnet, e.g. lxc-ls --fancy NAME STATE IPV4 …
eos
  • 551
  • 4
  • 10
  • 27
5
votes
4 answers

Setting the noatime flag for filesystems inside an lxc container

My host filesystem is ext4 mounted with the noatime flag. But inside an lxc-container, the flag is absent. Here's the output of mount on the host: /dev/sdb1 on /home type ext4 (rw,noatime) And here's the output of mount in the…
HRJ
  • 225
  • 2
  • 10
5
votes
2 answers

Does LXC container performance depends of host load?

I am wondering if LXC could offer a full isolated benchmarking environment. Let's say we have 2 identical machines, with the same fresh Linux and without network connection. First machine has a load average of 50 and second one only 1. I put the…
5
votes
3 answers

What is required to activate cgroups in Linux

I have a Debian squeeze kernel (linux-image-2.6.32-5-openvz-amd64) which according to the Doku should support cgroups. When I look into the kernel configuration, it does (or is some other kernel configuration required?) # zgrep -i cgroup…
divB
  • 568
  • 1
  • 7
  • 23
5
votes
1 answer

LXC container with bridge networking exposes fake MAC address to external network

I'm running LXC container (lxc 0.7.2-1) on Debian squeeze with bridge networking configured by the book with public IP and I have problem that it exposes fake MAC address from LXC container to external network where it gets blocked by switch port…
AlexD
  • 8,747
  • 2
  • 29
  • 38
5
votes
4 answers

Running systemd based container in LXC

I'm currently trying to run an Arch Linux container using LXC on an Ubuntu 12.04 host. Arch Linux has recently migrated to systemd, which according to a variety of places has some problems operating as an LXC guest. However, many of these sources…
Impredicative
  • 155
  • 1
  • 5
5
votes
2 answers

lxc bandwidth control using tc

I am trying to restrict bandwidth inside my containers. I have tried using the following commands , But I think it is not getting effective. cd /sys/fs/cgroup/net_cls/ echo 0x1001 > A/net_cls.classid # 10:1 echo 0x1002 > B/net_cls.classid #…
kumar
  • 433
  • 3
  • 10
  • 23
4
votes
2 answers

Jenkins web server not responding to HTTP requests in Ubuntu/Dell PowerEdge R640

I have a system (the "host") that runs several containers, using LXC (i.e. the "guests"). I've installed Jenkins inside the guests and they appear to be working as intended, except that they don't respond to requests. (I've made several successful…
code_dredd
  • 156
  • 1
  • 1
  • 11
4
votes
1 answer

Configure LXC to use specific DNS server instead of DNSMASQ

Out of the box, my LXC containers connect to a running instance of dnsmasq, which is started with the lxc-net service. In my case, I am running a local unbound DNS server that connects to a thing called ncdns which lets me browse .bit domains that…
jcarpenter2
  • 253
  • 1
  • 4
  • 14
4
votes
1 answer

Proxmox. ERROR: Backup of VM failed - CT is locked (backup)

I tried to create backup of the container (LXC) in my Proxmox and I get the error: INFO: starting new backup job: vzdump 206 --node my_server --mode snapshot --storage backups-stor --remove 0 --compress lzo INFO: Starting Backup of VM 206…
Stan Zeez
  • 221
  • 1
  • 2
  • 5
4
votes
2 answers

LXC/LXD install operating system from custom dvd image

I have a dvd image which is a custom installer for OpenSuSE. My PC is running Ubuntu 16.04. I want to install a new virtual operating system with this image. Since I would like to have a lightweight virtualization I think lxc/lxd is the right…
guettli
  • 3,591
  • 17
  • 72
  • 123
4
votes
0 answers

Automate the LXD configuration interactive setup?

I realize lxd init has an interactive setup for networking, etc. I'm looking to automate some VM's running LXD and was wondering if there is a nice CLI command that documents this configuration as a command instead of an interactive walkthrough.
coderkid
  • 193
  • 1
  • 5
4
votes
1 answer

SELinux on CentOS7-based LXC?

Is there any way to enable SELinux on LXC-based container using proxmox 4.2?
MyFault
  • 913
  • 3
  • 15
  • 36
4
votes
1 answer

Mount ZFS dataset in unprivileged container

First a bit of information about my configuration: Ubuntu 15.10 ZFS pool created LXC containers stored in pool/lxc Dataset created in pool/mydataset owned by user1 Now I need one of the containers to access the files/folders in pool/mydataset. I…
ghetto
  • 41
  • 2
4
votes
0 answers

IOTOP on LXC -> Netlink error

unfortunately I can not use iotop on proxmox-lxc-container and debian 8 template. This is the output: Traceback (most recent call last): File "/usr/sbin/iotop", line 17, in main() File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line…
MyFault
  • 913
  • 3
  • 15
  • 36