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

414 questions
127
votes
10 answers

Can you run Docker natively on the new Windows 10 (Ubuntu) bash userspace?

My understanding was that the primary limitation of running docker on other OSs was the Linux Network containers that made it possible. (Certainly for Macs). Recently Microsoft announced a beta of a Ubuntu linux user mode running natively on…
Hawkeye
  • 2,669
  • 9
  • 30
  • 34
70
votes
13 answers

Docker containers can't resolve DNS on Ubuntu 14.04 Desktop Host

I'm running into a problem with my Docker containers on Ubuntu 14.04 LTS. Docker worked fine for two days, and then suddenly I lost all network connectivity inside my containers. The error output below initially lead me to believe it was because…
Thomas V.
  • 1,991
  • 2
  • 16
  • 13
70
votes
7 answers

How to specify hostname for the running container?

I'm having trouble setting the hostname on a running docker container. I'm also having trouble understanding how to specify hostname after the image is started. I started a container from an image I downloaded: sudo docker run -p 8080:80 -p 2222:22…
Miguel Ping
  • 825
  • 1
  • 6
  • 9
57
votes
4 answers

Relationship between Vagrant, Docker, Chef and OpenStack (or similar products)?

I am a web developer, but I am also interested in a few administrative tasks. Hence, the new move from pure administration to dev-ops comes handy for me. Anyway, I have some problems to put a few things into a relationship. Maybe there isn't any, so…
Golo Roden
  • 781
  • 1
  • 8
  • 10
41
votes
6 answers

How to disconnect from lxc-console

I'm working with lxc in Ubuntu 12.04, and it's really great. However, I am unable to disconnect from a lxc-console session after I've connected. I read somewhere that Ctrl-aq will disconnect me from the console but it doesn't seem to work. Should I…
robbyt
  • 1,622
  • 3
  • 14
  • 26
34
votes
6 answers

Mount Docker container contents in host file system

I want to be able to inspect the contents of a Docker container (read-only). An elegant way of doing this would be to mount the container's contents in a directory. I'm talking about mounting the contents of a container on the host, not about…
dflemstr
  • 533
  • 1
  • 5
  • 7
22
votes
4 answers

Is it possible to start LXC container inside LXC container?

Is it possible to start LXC container inside another LXC container?
Mikhail
  • 229
  • 1
  • 2
  • 3
17
votes
5 answers

Setting up bridged LXC containers with static IPs

I'm trying to setup multiple LXC containers on a host, each with public static IPs of their own. My host is running the latest Ubuntu. It has a single network interface named eth0. The static IPs are pingable from the internet and are named…
EthernetCable
  • 281
  • 1
  • 2
  • 7
17
votes
4 answers

No tun device in lxc guest for openvpn

I am trying to set up an openvpn server inside a lxc guest. However, it seams there is no tun device available in the container. Starting openvpn inside the container gives me this error: Tue Sep 18 13:04:18 2012 Note: Cannot open TUN/TAP dev…
Lawrence
  • 233
  • 1
  • 2
  • 5
16
votes
2 answers

Running containers inside a virtual machine?

It is my understanding that containers are much more lightweight than VMs because they do not virtualize the hardware but instead just isolate the software running in them from software running in other containers on the system. My situation is such…
Chris L
  • 323
  • 1
  • 4
  • 9
14
votes
1 answer

Logical volume attributes

I've used lxc-clone command to clone my lvm-based container (test_lvm was copied to create u33). Container works fine, but the output of sudo lvs confuses me: LV VG Attr LSize Pool Origin Data% Move Log…
maniaque
  • 710
  • 2
  • 5
  • 13
13
votes
3 answers

Linux containers (LXC) on Red Hat/CentOS EL6 - lxc-create versus libvirt?

It's tricky trying to stay within the good graces of Red Hat and still plan for system longevity... I've been a proponent of Linux Containers (LXC) for over a year. My initial installations were based on information gleaned from online tutorials,…
ewwhite
  • 194,921
  • 91
  • 434
  • 799
13
votes
1 answer

Why use lxc instead of chroot?

One ubuntu server hosts 3 apps all on separate domains. Each app has its own developers. App developers belong to linux "sftp" group. chroot allows password sftp access for each app developer. /home/app1/prod /home/app2/prod /home/app3/prod In…
csi
  • 1,535
  • 7
  • 22
  • 42
13
votes
5 answers

Compute a list of difference between packages installed on two hosts

I just add some problems with my Debian virtual servers and I add to reinstall all of them from scratch. However, I still had access to the old version and I could retrieve the list of installed packages. In order to facilitate the process of…
krtek
  • 583
  • 4
  • 8
12
votes
3 answers

Easy way to transfer files between host and LXC container on LVM

This is an easy task in the case of containers that share the same filesystem but I'm not sure what would be the proper approach for containers that use LVM disks. I know I could use rsync or scp but I would like to know if it is possible to do this…
s3v3n
  • 316
  • 2
  • 4
  • 13
1
2 3
27 28