Questions tagged [lxc]

LXC is an operating system-level virtualization method for running multiple isolated Linux systems (containers) on a single control host. It is sometimes referred to 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 further kernel distibutions.

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

591 questions
3
votes
3 answers

Connecting to lxc container via SSH using lxc user

I noticed that the username/password I use to connect to a newly created LXC container via lxc-console doesn't work with ssh (with sshd running in the container). When I try, I get Permission denied Why is that, and how can I make it work?
Josh Stone
  • 4,328
  • 7
  • 29
  • 37
3
votes
1 answer

Docker Run With SELinux on ubuntu Constrain violation

On Ubuntu 14.04, I run Docker with SELinux,As I Known,Docker will Read $Selinux-Root-Dir/default/contexts/lxc_contexts。but I can't find this file,so I create this file and puts some contents.following: process =…
John Stevo
  • 63
  • 7
3
votes
1 answer

debian lxc create error

I recently freshly installed Debian 8, and i want to create a linux contener based on wheezy. But when i launch the command: sudo lxc-create -n omvctr -t debian -- -r wheezy -a amd64 I obtain this trace : Generation complete. update-rc.d: using…
Seb
  • 1,118
  • 1
  • 11
  • 25
3
votes
2 answers

Questions about Mesos Linux container and Docker

The Apache Mesos page describes that Mesos enables task isolation through "Linux Containers". What container technology is this, LxC? Does "native Docker support" mean that the above container technology can we swapped to Docker? What does it mean…
user1340582
  • 19,151
  • 35
  • 115
  • 171
3
votes
0 answers

Hadoop in LXC container error : YARN : 1/1 local-dirs are bad

I have two hadoop instances running inside two lxc containers on the same host, a hadoop-master and a hadoop-slave1. While starting YARN & DFS on master I get this UNHEALTHY state for hadoop-slave1. For what I've found on the web it must be one of…
AlexandruC
  • 3,527
  • 6
  • 51
  • 80
3
votes
0 answers

How to disallow users' changing ip inside LXC container?

Because a valid IP has been decided and allocated by 'lxc.network.ipv4' option in 'lxc.config' file, so I don't want user inside the lxc container to change it to another ip (by commands like ip addr, ifconfig, etc), which might result in ip…
3
votes
1 answer

Docker relationship to VMs and LXC

My understanding of Linux Containers (LXC) is that it provides a native hypervisor for Linux systems, similar to Windows' Hyper-V introduced in Windows 8. By "native hypervisor", I mean, the ability for the Linux system to host guest VMs inside of…
smeeb
  • 27,777
  • 57
  • 250
  • 447
3
votes
1 answer

Adding installation packages to linux containers (lxc) caches

How do I add a couple of packages to the default Ubuntu installation in lxc, so that the results are cached? Currently my script creates containers like this lxc-create -t ubuntu -n foo -- --packages "firefox,python2.7,python-pip" It works but is…
Hannu
  • 11,685
  • 4
  • 35
  • 51
3
votes
0 answers

Docker intermittently failing to start container

I'm using Docker with Jenkins to run Rspec tests, and I'm getting this intermittent error: [workspace] $ /bin/bash /tmp/hudson4240670520825002309.sh 2014/06/26 09:59:20 Error response from daemon: Cannot start container…
wrangler
  • 1,995
  • 2
  • 19
  • 22
3
votes
4 answers

TAP/TUN adapter in LXC container

I am trying to create an lxc container that acts as a vpn server. I am trying to add the tap/tun adapter to the container's device list. I have tried adding the following line to the lxc config. lxc.cgroup.devices.allow = c 10:200 rwm That did not…
ashwinjv
  • 2,787
  • 1
  • 23
  • 32
3
votes
1 answer

Docker Use LXC with Direct Host Networking

With the release of Docker 0.11, one can use the host's network directly by specifying --net=host when running the container. This allows me to bind to the host's IP address, which enables the use of service discovery with consul etc. However, if I…
Programster
  • 12,242
  • 9
  • 49
  • 55
3
votes
1 answer

Possible to build and run Docker images in Linux VM on Parallels on OS X?

I'm just getting started with Docker and use a MacBook Pro for development work. I see the Docker instructions recommend using Virtual Box and Boot2Docker in this environment. Anyone know if it would also work in a Linux VM in Parallels?
bgibson
  • 17,379
  • 8
  • 29
  • 45
3
votes
1 answer

Can Linux Container run on a virtual machine?

As far as I know, Linux container is different from virtual machine. It's lightweight virtualization technology. So I'm wondering if it can be run on a virtual machine which provisioned by hypervisor like xen, kvm or vmware? I was trying setup a…
Xiaoming
  • 599
  • 2
  • 8
  • 17
3
votes
1 answer

how does an app within a docker container access database hosted on another server which is in the same LAN

I have an app within a docker container(ip: 172.17.42.1) on a server(ip: 192.168.1.8), and mysql database is on another server(ip: 192.108.1.19).
Tallmad
  • 1,951
  • 4
  • 22
  • 29
3
votes
2 answers

linux container display wrong information

*i start the linux container in docker with specific cpus * typing command 'cat /proc/cpuinfo in my container, container shows full specification of laptop instead of only container. why this can v happened ?