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

LXC container ignores etc/hosts

I'm trying to map a hostname to a ip address on a lxc container because the hostname will not be resolvable by DNS. The lxc.conf of the container contains lxc.mount.entry = /sas/mycontainer/etc/hosts etc/hosts none ro,bind 0 0. Insinde the hosts…
sahisb
  • 31
  • 5
0
votes
1 answer

Zabbix not detecting free swap space in linux container (LXC)

I have an LXC container that has 4GB of swap, most of which is free: # swapon -s Filename Type Size Used Priority none virtual 4096000 97004 0 However,…
P.Péter
  • 569
  • 2
  • 6
  • 24
0
votes
1 answer

Can't use lxc-console on CentOS 7?

I am using a vagrant to run centos7 now. I created a lxc container which also base centos7 inside this vagrant os. I can start the lxc but can't use lxc-console. Like this: $ sudo lxc-create -n centos -t centos $ sudo lxc-start -n centos -d $ sudo…
cloud_cloud
  • 165
  • 2
  • 4
  • 15
0
votes
1 answer

Running LXC or Docker containers with a VServer container

Is it possible to run Docker or LXC containers within a Linux VServer container. Does it require special kernel modules to be installed on the VServer.
Nadir Latif
  • 261
  • 3
  • 6
0
votes
1 answer

LXD: attaching to running container not accessible through lxc command

A broken update left one of my containers inaccessible from lxc command but I can login (ssh) into it. I have an old snapshot but there is one file (a key file), only read by root, which I need from it and I'm unable to read as the default user. I…
lepe
  • 469
  • 2
  • 6
  • 25
0
votes
1 answer

Access KVM Guest from LXC Container (lxcbr0 -> host -> virbr0)

I am trying to access a Windows Guest on KVM from a Linux Guest in an LXC container. Specifically, I only need to be able to access one port (TCP 4949 / munin) from said LXC container. LXC is set up to use the default lxcbr0 bridge (IP 10.0.3.1) and…
0
votes
1 answer

LXC CentOS Container does not work with multiple IP addresses

Hoping someone can help me as i've been pulling out the only hair I have left (which is not much) trying to figure this out. I'm unable to assign multiple IPs to any CentOS 7 container, only the first adapter/IP works correctly. This only happens on…
sMyles
  • 153
  • 1
  • 1
  • 8
0
votes
1 answer

Ubuntu 16.04 lxc no tty present and no askpass program specified

I'm using Ubuntu 16.04 and lxc 2.0.7-0ubuntu1~16.04.1, I got this error sudo: no tty present and no askpass program specified in an unprivileged container( Ubuntu 16.04 amd64). This is my /dev ubuntu@unpc:~$ ls -al /dev/ total 4 drwxr-xr-x 6 root …
dawncold
  • 23
  • 1
  • 10
0
votes
1 answer

Why lxc container doesn't execute config files on /etc/sysctl.d?

My host is Ubuntu 16.04.1 LTS with privileged container. I want to disable ipv6 of container, so I created a config file on /etc/sysctl.d/60-disable-ipv6.conf, I have tried lxc-start and lxc-stop -r my container, container's ipv6 is not disabled…
dawncold
  • 23
  • 1
  • 10
0
votes
0 answers

Unprivileged lxc container versus AppArmor

I want to run several instances of apache2 (2.4 to be precise) with php 7 (libapache2-mod-php7.0) under debian stretch. Is it more secure to run every instance (with its own config) in its own unprivileged lxc container and confining the containers…
Thilo
  • 243
  • 3
  • 11
0
votes
2 answers

Boot Proxmox container into grub?

Is there anyway to boot a Proxmox container into grub? Every time I start it it goes straight into the login screen. I'm using the Proxmox web interface and the Proxmox version is 4.2-17.
0
votes
1 answer

LXC - How to assign public ip to a single container

Here is my setup. Host Machine-[Ubuntu 16.04][185.82.xx.xx] Container1 [10.0.8.9] Container2 [10.0.8.100] Container3 [10.0.8.101] Container4 [10.0.8.102] All are working great. Now, I purchased another dedicated IP for my server. I have…
alioguzhan
  • 103
  • 4
0
votes
1 answer

iptables SNAT & masquerade to separate public IP for LXC containers

Almost embarrassed to post this but it's one of the few times I can't put in to words (properly) what I'm trying to do and Google it. I have a hosted Ubuntu server with two public IPs. The host machine will have some services available to it and…
Matt
  • 3
  • 2
0
votes
1 answer

What is stored on a LVM LogicalVolume

I have setup a LXC container with LVM as backingstore. On the host the command lvs --units m outputs the following: LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert vm dvg -wi-a---- 1000.00m When…
J. Pee
  • 42
  • 6
0
votes
1 answer

Possible ways to automate post installation in lxc containers

I'm having difficulty overseeing the possibilities of howto deploy an application on to a fresh LXC container. Say I have a fresh LXC container, how would I provision it with my to-be deployed application? Am I working against the intended use of…
hbogert
  • 411
  • 1
  • 5
  • 18