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
1
vote
0 answers

How to get additional private consoles in LXC (not using host's TTYs)?

I created a LXC container, and I can connect to it's console 0 lxc-console -n foo -t 0 But I want more than one virtual, private (container only) console. If I set lxc.tty = 2 in the config, that refers to host TTY's that are supposed to be shared…
v78gh
  • 11
  • 3
1
vote
0 answers

apparmor.service fails within container (LXC)

I am trying to enable apparmor within the privileged container but for some reason it fails. I have already enabled the apparmor in the host kernel(4.9) and also in the userspace(apparmor 2.11 version). systemctl status apparmor -l logs ●…
Thushi
  • 111
  • 3
1
vote
1 answer

lxd with own br0 Network is Unreachable in centos conteiner

When I run lxd init I choose this setting. Would you like to create a new network bridge (yes/no)? no because I created my own br0 in /etc/network/interfaces source /etc/network/interfaces.d/* auto lo iface lo inet loopback auto br0 iface br0…
cyprian
  • 111
  • 2
1
vote
0 answers

Linux router set up in LXC on the host machine

I came to you to seek help, maybe clear some things up... You must agree with me, networking is not that easy to grasp! todays topic: Having a LXC router running on the host machine, doing same job as host machine running as router would do. Some…
ITry
  • 11
  • 3
1
vote
1 answer

Unable to install packages in LXC unprivileged container

I am new to the whole containers thing. I have successfully create an unprivileged wheezy container on a debian 8.8 host using lxc 2.0.7. But when I'm trying to: lxc-attach -n container1 -- apt-get install openssh-server I got this error…
1
vote
1 answer

Could not set limit for 'nofile' - "Operation not permitted" in a LXD unprivileged container

I am running a centos7 unprivileged LXD container on a ubuntu 17.04 host. I have a problem setting ulimit for NOFILE inside the container, if it is running in unprivileged mode. Bellow are the steps to reproduce: $ lxc launch images:centos/7/amd64…
Mircea Vutcovici
  • 17,619
  • 4
  • 56
  • 83
1
vote
1 answer

LXC guest OS installation

I have created a LXC virtualized physical server with Centos 6.8 as host OS. Now when I am creating guest VM using the default template of Centos, it is creating the VM's with Centos 6.8 as the guest OS. I wanted to create a VM with Centos 7.2…
nirmalraj17
  • 203
  • 4
  • 13
1
vote
1 answer

Best way to containerize an existing PHP/MySQL app into customer tenants

I have a normal Apache/MySQL serving a webapp that companies and users of those companies log in to. So everyone from all the companies are in the same Users table. Whilst my code does try to keep the companies isolated in PHP, such as SELECT * FROM…
servermanfail
  • 201
  • 1
  • 4
  • 12
1
vote
2 answers

Can't access LXC container network Proxmox 4.4

I am setting up an LXC container on a fresh install of Proxmox 4.4. My network setup is analagous to the one described in this post: network configuration (bridging) proxmox However, I still cannot access the container from the local network, and…
AveryFreeman
  • 289
  • 1
  • 3
  • 14
1
vote
1 answer

Backup LXD container to an other LXD host

I have two servers A and B which are running Ubuntu 16.04 and an RAID1 ZFS file system for LXD. At the moment there are a few containers running on server A. Now my idea to make nightly backups from each container on server A to server B. This way I…
1
vote
0 answers

Unable to start lxc container with -f

I'm trying to migrate some lxc containers from lxc 1.1 on Ubuntu 14.04 to lxc 2.0 on Ubuntu 16.04. Our scripts don't ever call lxc-create, but invoke the containers directly with lxc-start and a custom config file: lxc-start -d --name mongo -f…
JSBձոգչ
  • 111
  • 4
1
vote
1 answer

ip_conntrack_ftp inside LXC

ProFTPd instance on a LXC container behind NAT LXC container is using bridged networking PassivePorts 60000 61000 has been defined in proftpd.conf nf_nat_ftp and nf_conntrack_ftp loaded on the host running the container iptables inside the…
S19N
  • 1,803
  • 1
  • 19
  • 28
1
vote
1 answer

Container can't ping github.com but host can

I have the following setup: [ LXC Container running Debian ] <--> virbr0 <--> [Fedora 24 host] DNS resolve works for every single domain I've tried to so far from the host and from the container. Except "github.com" and any of it's IP addresses (I…
AreusAstarte
  • 111
  • 3
1
vote
1 answer

NAT Masquerading second container network

I have 1 public IP, and would like to share internet connection to LXC containers running Centos (in this setup) the host runs proxmox (debian based). If I understand correctly, i need NAT masquerading, the problem is, the second container I create…
SvennD
  • 749
  • 5
  • 18
1
vote
0 answers

Using net.ipv4.ip_forward=0 for LXC containers causes DUP! ICMP packets on VMs

I run LXC Linux containers and so I have net.ipv4.ip_forward=1 set on the host so that I can ping internet (google.com) from inside the LXC container. However, when I run VirtualBox VMs in the same environment and bridge to the wlan wireless…
gstanden
  • 31
  • 4