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

LXC and port overlapping

I've done a lot of searching on Google and browsed what I could find on Server Fault, but can't find any solution to this. I have a server that is running LXC containers (2 for right now, both Ubuntu). The LXC network is bridged (10.0.3.0/24), with…
2
votes
1 answer

lxc vm access outside the host

On Debian 64bit, I configured a lxc like this : host ip : 172.16.0.25 vm guest on this host : 172.16.0.44 I've done the bridge on my host auto eth0 iface eth0 inet manual up ifconfig eth0 0.0.0.0 up down ifconfig eth0…
Stef
  • 572
  • 1
  • 6
  • 16
2
votes
1 answer

NAT for static private addresses

Could someone please help me out with the following scenario: I have a machine that hosts 3 lxc containers, and acts like a router for them. The LXC containers have private ip addresses set on the interfaces that are connected to the host. I want to…
biggdman
  • 153
  • 1
  • 2
  • 10
2
votes
1 answer

firehol (firewall) with bridge: how to filter

I have two interfaces: eth0 (public address) and lxcbr0 with 10.0.3.1. I have a LXC guest running with ip 10.0.3.10 This is my firehol config: version 5 trusted_ips=`/usr/local/bin/strip_comments…
Leon
  • 121
  • 3
2
votes
2 answers

When I restart my LXC environment, the container does not re-bind to the IP address

The IP does no longer respond to a remote ping With restart I mean: lxc-stop -n vm3 lxc-start -n vm3 -f /etc/lxc/vm3.conf -d -- /etc/network/interfaces auto lo iface lo inet loopback up route add -net 127.0.0.0 netmask 255.0.0.0 dev lo down route…
RoboTamer
  • 502
  • 1
  • 4
  • 17
2
votes
2 answers

Proper way to expose VirtualBox' machine to network via "one MAC" security locked switch port

Say, we need to expose LXC container (LXC) or Virtualbox VM (VBM) to public network with its own IP-adress (within additionaly assigned network — ADD-net) which is to be routed through main host. When in SOHO environment it is quite okay to use…
cadmi
  • 7,308
  • 1
  • 17
  • 23
2
votes
1 answer

How to start external programs in "unshare" container, with sending of file descriptors?

With unshare or lxc-execute I can create environments with separate network/mount/whatever namespaces. But starting programs there from outside is not really straightforward. Usually network and sshd is used, I also use UNIX socket with socat…
Vi.
  • 841
  • 11
  • 19
2
votes
1 answer

FTP proxy with SSL support

I have a bunch of LXC containers with vsftpd daemon installed on each. I would like to forward/proxy traffic from dom0 server port 21 to particular containers based on ftp user name e.g. user@domain.com or domain part to be more precise. I tried to…
ahes
  • 95
  • 1
  • 2
  • 10
2
votes
1 answer

modprobe inside an LXC container

I need to run a WebDAV server inside of an LXC container, but I'm being told that modprobe is not available (even as root). I've seen that this was requested by developers, but how can I get around it? Running on Debian Squeeze. Here's the messages…
2
votes
1 answer

NTP on main server, and alternative on virtual (LXC)

I am setting up a server with several VPS. I am using LXC. I am thinking it would be better to have only the main server equipped with ntp and have the virtual boxes just get the time from the main box. Is there a bash/python/php etc script I could…
RoboTamer
  • 502
  • 1
  • 4
  • 17
2
votes
2 answers

veth, macvlan or maybe sth else?

I don't understand the modes of lxc network. I'd like to have 4 guests: apache1, apache2, database and frontdoor frontdoor is a squid which decides which apache should be used It works perfectly on vservers, when all of guests has a dummy interface…
SledgehammerPL
  • 773
  • 9
  • 16
2
votes
0 answers

Chrony doesn´t start in Proxmox container

I have created a container with Debian (Debian 11 template) on top of Proxmox 7.0.8. It is essential that the operating system keep the time synchronized and for this I installed chrony, but it does not start. journalct -xe dump: root@pamiweb:~#…
Francisco
  • 129
  • 6
2
votes
1 answer

LXC container network with OVS not forwarding ARP correctly

Using lxc containers, I want to simulate network components individually. For this, I am trying to embed OVS in an lxc container. Initially, I started with the following setup, which works properly and the two hosts can ping each…
Friwi
  • 121
  • 2
2
votes
0 answers

How to move a linux container to a remote server running proxmox 7.0?

I am currently in the process of migrating a server running several linux containers to a server managed by proxmox. In the past when i moved a linux container to a different host i just used the LXD API, simplestreams protocol and executed a lxc…
harald
  • 403
  • 2
  • 6
  • 19
1
vote
0 answers

lxc with apparmor - where should be defined profiles

I created /root/example.sh from here at the host, and with aa-genprof denied it. # ./example.sh This is an apparmor example. ./example.sh: line 5: /usr/bin/touch: Permission denied File created ./example.sh: line 8: /bin/rm: Permission denied File…
SledgehammerPL
  • 773
  • 9
  • 16