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

557 questions
0
votes
0 answers

Execute mongod in linux container with limited resources

Can you tell me how is it possible to start mongodb in an isolated enviroment with limited resources? Mongod keeps filling all my RAM so I would like to restrict it. I am thinking about a linux container like LXC. Can you give me an example of how…
Giorgos Komnino
  • 413
  • 1
  • 7
  • 19
0
votes
1 answer

execute terminal command in isolated unix environment

I am writing a webapplication in which users are able to execute git, bzr, and hg commands on the server. Basically, a user writes the git/bzr/hg command into a html form, hits a button, the command is sent to the server, and executed in the…
David Graf
  • 1,052
  • 2
  • 13
  • 22
0
votes
1 answer

How to switch user-space process back to the root network namespace?

The problem is that /var/run/netns/ directory contains all the network namespaces, except the root namespace. So I am not sure, how to get the fd, that should be passed to the following kernel call: syscall(__NR_setns, fd, CLONE_NEWNET)
user389238
  • 1,576
  • 3
  • 18
  • 40
-1
votes
1 answer

LXC using separate HDD/VOLUME

Is there some method how can I define the major device (hdd, volume, ..) for LXC container? I have separated disks for each service/project which I want run inside LXC container. But I couldn't find the way how can I specify storage for all files in…
Petr Klein
  • 447
  • 1
  • 6
  • 15
-1
votes
1 answer

How to setup ssh connection between lxc container and an ubuntu machine

I am new to ansible.I have an ubuntu machine where i have installed Ansible and 3 lxc containers.I am not able to setup ssh connection between the source machine which is ubuntu VM and container.I want to use passwordless authorization between…
-1
votes
1 answer

docker network create command - swarm

Below is the command used to create overlay network driver for swarm cluster instead of using bridge network driver $ docker network create -d overlay xyz $ docker network ls NETWORK ID NAME …
overexchange
  • 11,586
  • 11
  • 75
  • 203
-1
votes
1 answer

Create an LXC container from a local centos template (tar.gz)

I have a custom centos, where we made some changes, and I would like to create a LXC from that template. Is it possible ?
Hassan Wh
  • 97
  • 1
  • 12
-1
votes
1 answer

Build Bazel on LXC ARM take very long time

I am using LXC ARM7l Architecture and tried to build bazel onto it but it takes 50 hrs and still building at that moment !! I think that is very long time and it still printing some lines like those image There is something not right, isn't it ?…
M Y
  • 334
  • 1
  • 5
  • 18
-1
votes
1 answer

DNS resolution inside an LXD container doesn't work

I've recently begun experimenting with LXD containers and ran into a basic roadblock that i can't seem to fix. I'm not able to run and apt updated inside a container ubuntu@dev:~$ lxc exec adil-php5 -- apt update .... Err http://archive.ubuntu.com…
Adil
  • 1,870
  • 3
  • 23
  • 33
-1
votes
1 answer

lxc use NAT to access the internet, in container, execute ping www.bing.com already work, but open www.bing.com in browser, prompt TIME OUT

Description: 1) I have only one physical NIC wlan0 and I use lxc to create a container named u1 2) I create a bridge name lxcbr0 and applied a static ipv4 addr to it, it's 192.168.55.1, then I modify u1/config to assigned a static ip to it when u1…
Naruto
  • 1
  • 2
-1
votes
2 answers

LXC. Container's IP from the same network as host

I am trying LXC. Now I want to assign IP to guest (container) from the same network as a LXC host. As host OS I use Ubuntu 14.04.3, and as guest - Ubuntu 15.10. LXC host machine uses my home router for Internet accessing (default gateway), LXC host…
ipeacocks
  • 1,901
  • 2
  • 28
  • 44
-1
votes
1 answer

A C program to find the container name insider the container - LXC

I am looking for C specific function to return the container name if it get executed inside the container; Do we have anything of such? Currently I am trying to get it by reading the file /proc/1/cgroup @ container: $> cat /proc/1/cgroup …
Viswesn
  • 4,030
  • 1
  • 26
  • 38
-1
votes
2 answers

How to get the IP address of an LXC container?

I have started the lxc using lxc-start. Now, how I can get the IP address of the container?
Ark
  • 950
  • 7
  • 12
-1
votes
2 answers

How i can get the current state of a lxc container with python?

I use the lxc module for python and i need the python command to check up the current container state. Or i need a boolean command to check whether the container is current running.
Smeagol86
  • 15
  • 1
  • 9
-2
votes
1 answer

Do I need to create multi host network in docker?

For the below docker-compose building docker file dynamically: version: '2' volumes: jenkins_home: external: true services: jenkins: build: context: . args: DOCKER_GID: ${DOCKER_GID} DOCKER_ENGINE:…
overexchange
  • 11,586
  • 11
  • 75
  • 203
1 2 3
37
38