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
2 answers

Dovecot lxc apparmor denied (Buster)

I can't run dovecot in lxc on Buster. I turn off PrivateTmp, but it isn't enough... Still : [ 4850.883141] audit: type=1400 audit(1563803461.322:34): apparmor="DENIED" operation="mount" info="failed flags match" error=-13…
SledgehammerPL
  • 773
  • 9
  • 16
1
vote
1 answer

LXC container cannot ping outside

I'm currently creating a new container on a fresh server and I'm facing a network issue. Basically the container cannot reach anything on the Internet i.e. every request timeout. Here are the information related to the host and the lxc…
Forbinn
  • 11
  • 1
  • 5
1
vote
2 answers

LXC and iptables - how to change source IP address from main IP to different IP address

I have LXC container with mail server and "dedicated" IP address. "Dedicated" means that 25 and 110 port of the IP address are forwarded to 25 and 110 port of the container. This is done with iptables. Let assume internal address of the container is…
Nick
  • 826
  • 2
  • 15
  • 42
1
vote
0 answers

Unprivileged LXC fails to find subuid / subgid allocation

When I run lxc-usernsexec I get the error message: Failed to find subuid or subgid allocation lxc-create and lxc-start work without any problems, but I would need to run lxc-usernexec to remove a container without being root. The only google hit…
allo
  • 1,620
  • 2
  • 22
  • 39
1
vote
3 answers

Docker inside LXC starting container process caused "apply caps: operation not permitted"

I'm trying to run a Docker container inside an LXC container. However doing so causes me to get the following error: [root@DH-DockerLXC01 alex]# docker run fedora bash docker: Error response from daemon: OCI runtime create failed:…
Alex
  • 389
  • 9
  • 23
1
vote
0 answers

Proxmox: how to access a ZFS volume directly through guest?

That may sound like a strange use case, but is there a way to access a ZFS volume directly through an LXC container or a Qemu VM with Proxmox? I'd like to have incremental backups pushed to my guest on my server from my computer. For this, I'd be…
Luka
  • 11
  • 1
  • 3
1
vote
0 answers

What is standard way to forward port from host to LXC container?

I am researching LXC containers. When I do verth network, libvirtd creates some iptables rules: [root@VM ~]# iptables -L -n -v Chain INPUT (policy ACCEPT 61 packets, 6229 bytes) pkts bytes target prot opt in out source …
Nick
  • 826
  • 2
  • 15
  • 42
1
vote
1 answer

How to set the dns on lxc containers staticly?

I am trying to set the dns manually to a lxc container. I already read your comments on [Setting up bridged LXC containers with static IPs But this did not work with me. In etc/network/interfaces inside the container I tried: auto eth0 iface eth0…
YOUSEF
  • 11
  • 2
1
vote
2 answers

Accessing LXC frm host over local network

Hay! I searched a lot, but it seems this is not common issue. Comments are much appreciated! # Set variables HOST=192.168.0.254 LXC=192.168.0.105 I am dealing with LXC (NGINX, MySQL) and I am not able to access the NGINX websites from my host over…
1
vote
1 answer

getting ipv6 via radvd/dhcpd6 in an LXC guest working

what i want my setup has a dynamic amount of LXC containers and therefore i need some dynamic ipv6 address allocation. the interface brNC-internet is a simple bridge which is mapped into the LXC based container. i need a way to assign ipv6 addresses…
qknight
  • 161
  • 7
1
vote
1 answer

Configure dnsmasq to passthrough search domain to LXC guest? (Ubuntu 16.04)

Our network relies on DHCP tags to route clients to the correct upstream hosts without having to know the FQDN of those hosts. We use dnsmasq to set tags for clients by MAC address and then we push different search domains to the clients based on…
sagargp
  • 111
  • 4
1
vote
0 answers

IPv6 to LXC container

I've got an ipv6 /64 subnet and use lxc/lxd with many container. The ipv6 /64 subnet is attached to eth0. Now I want every container get an ipv6 (maybe in an /56 subnet of this /64?) and be available extern. How do I get this setup?
talukocizo
  • 11
  • 2
1
vote
0 answers

NAT not working with LXC

I've got a dedicated server and I'm trying to create a NAT. My virtual hosts are LinuX Containers, I've got only 1 public IP address and I'm trying to be connected to the Internet inside my LXC. On my host, the default interface where I've got an…
ShellCode
  • 111
  • 3
1
vote
2 answers

Using host as ntp-client and lxc-router as ntp-server

I installed ntpd on my Debian host machine to keep the hardware RTC "up-to-date". By sharing the system's clock the time gets automatically propagated to all installed containers (lxc). One of those containers runs my router. I'd like to use this…
Kai Giebeler
  • 263
  • 2
  • 7
1
vote
1 answer

LXC 2.0 Ownership problems

If I launch an Ubuntu 16.04 container and install for instance memcached on it, then almost all the processes /proc//* descriptors are owned by nobody.nogroup or 65334.65334 Where as if I would install memcached it on my host machine these would be…