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

service apache2 restart leads to "Error: No space left on device"

If I do me@server:/home/me# service apache2 restart on my LXC-VPS (node-server is not under heavy load) I'm getting Error: No space left on device df -h tells me that there is plenty enough space /dev/loop1 394G 72G 303G 20% / none …
MyFault
  • 913
  • 3
  • 15
  • 36
3
votes
0 answers

/dev/ttyS0 in lxc container

How to set up lxc to get /dev/ttyS0 in lxc container. I add # /dev/ttyS0 lxc.cgroup.devices.allow = c 4:64 rwm into config but nothing works - If I add manually mknod in running container everything works until reboot - after reboot device ttyS0…
SledgehammerPL
  • 773
  • 9
  • 16
3
votes
1 answer

How to make a device node persistent in a LXC

I need /dev/fuse inside a LXC. cgroups are properly configured, i.e. I can manually create the device node and everything is fine - until I restart the container, then the node is gone. Of course I could recreate the node using a dedicated startup…
Lars Hanke
  • 285
  • 3
  • 16
3
votes
1 answer

Vsftpd doesn't work in passive mode in LXC container

I'm beginner in Docker, I have a vsftpd in a Debian and for passive mode I configured in vsftpd: pasv_enable=YES pasv_min_port=65000 pasv_max_port=65000 pasv_address=192.168.1.31 and I show with wireshark that server response with passive port…
user177949
3
votes
1 answer

systemd-journal in Debian Jessie LXC container eats 100% CPU

After creating fresh LXC based on Debian Jessie, on a Ubuntu 14.04, systemd-journal eats all CPU available. lxc-create -n jessie -t debian
Tombart
  • 2,143
  • 3
  • 27
  • 48
3
votes
2 answers

How do I configure LXC to allow the use of SCHED_RR in a container?

Any ideas on how I can configure LXC/cgroups, to allow the use of SCHED_RR for applications in a container? On the internet I have seen mention of unmounting the cpu-cgroup, I have tried that, manually (running umount on the cpu cgroup) that did not…
Henk
  • 59
  • 1
  • 2
  • 4
3
votes
1 answer

LXC and Saltstack minion_id configuration on Ubuntu

I'm using LXC as a lab platform for testing SaltStack scripts. The lab consists of +5 Ubuntu 12.04 LTS containers, which I create by cloning a template container with salt-minion pre-installed. Once I create the template container and install…
LavaScornedOven
  • 253
  • 2
  • 10
3
votes
0 answers

how to move process from one namespace to other?

Is there any available method to move process/group of processes from one namespace to other in Linux? I mean methods via commands of some packages or it can be done via setns()? E.g. I have processes of current session in one namespace and some…
zerospiel
  • 467
  • 1
  • 5
  • 10
3
votes
0 answers

dnsmasq and lxc with wildcard DNS subdomains

I'm using LXC to create a new containers. All of them are using dnsmasq with DHCP to get their IP address and to have local DNS server. I setup a domain .lxc in dnsmasq. So every container will get DNS address .lxc. But I didn't found any solution…
martin.malek
  • 163
  • 6
3
votes
1 answer

iptables port forwarding only for a certain range of IP

I'm using LXC containers. Each one of my containers have an ip address in 10.0.3.0/24. I want the packets that come into my host on a certain port to be redirected to a container so I use this rule: iptables -t nat -A PREROUTING -p tcp --dport 3000…
rmonjo
  • 231
  • 2
  • 4
  • 12
3
votes
1 answer

LXC container can only access host via bridge

I have an LXC container with i686 Ubuntu 12.04 running on a x86_64 Ubuntu 12.04 host. I've set up a bridge using instructions here. However the ping from the container only goes through to the host and not to other machines on the local network.…
vitaut
  • 131
  • 1
  • 6
3
votes
1 answer

LXC - quota inside container

Is it possible to use disk quota inside a LXC container? I'm using LVM (ext4) as rootfs for the container. I don't now how to add the mount options to /etc/fstab properly. The /etc/fstab of the container: rootfs / rootfs …
CiTuX
  • 131
  • 1
  • 3
3
votes
3 answers

Redirect localhost requests to a Linux container

I run a few Linux containers, each running a webapp, on my Ubuntu host. To access the webapps, I use iptables to forward port: sudo iptables -t nat -A PREROUTING -p tcp --dport -j DNAT --to-destination #: This work well…
rmonjo
  • 231
  • 2
  • 4
  • 12
3
votes
1 answer

Allowed cgroup devices for libvirt/lxc container

I want to allow my libvirt/lxc containers to use tun/tap device. In order to do so I for a running container I can add it to the allowed devices by: # echo "c 10:200 rwm" > /sys/fs/cgroup/devices/libvirt/lxc/client-1/devices.allow resulting in: #…
Zabuzzman
  • 733
  • 10
  • 25
3
votes
1 answer

Managing LXC containers in EC2

I have an EC2 instance running inside a VPC. I need to run a service inside a LXC container started in that instance and to make the service available to the outside world. I have therefore created a bridge (br0) and used the following…
Roberto Aloi
  • 575
  • 2
  • 5
  • 14