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
0
votes
1 answer

Can any "lxc-*" commands list the searching template path?

Can any lxc-* commands list the searching template path? Since in some OSs, the path is /usr/share/lxc/templates/, while in others, it may be /usr/local/share/lxc/templates/.
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
0
votes
0 answers

How to create a web based console that interacts with the command line

There are a few websites that allow you to code in a online editor, and then it compiles on a server and displays the output. I am guessing they are using docker and/or lxc to create a safe environment and isolate it for each session. How do they…
cool breeze
  • 4,461
  • 5
  • 38
  • 67
0
votes
2 answers

How to serve websocket apps from inside lxc container?

Inside lxc container I'm running a faye app. Gemfile: source 'https://rubygems.org' gem 'faye' gem 'thin' config.ru: require 'faye' Faye::WebSocket.load_adapter('thin') bayeux = Faye::RackAdapter.new(:mount => '/faye', :timeout => 25) run…
x-yuri
  • 16,722
  • 15
  • 114
  • 161
0
votes
1 answer

Host IP is not visible by LXC guests. Open vSwitch bridge

In such way I have configured OVS bridge for LXC containers LXC with Open vSwitch It is bridge configuration: # ovs-vsctl show 1b236728-4637-42a5-8b81-53d4c93a6803 Bridge "switch0" Port vethNSCEGY Interface vethNSCEGY …
ipeacocks
  • 2,187
  • 3
  • 32
  • 47
0
votes
3 answers

Configure LXC to use wireless hosted network

I found most of the configuration is for giving static or private network. But I want it to act as a different machine so it will get a separate IP address from the DHCP and I want to do it through nmcli. Thanks in advance.
Mayank Singh
  • 131
  • 4
  • 9
0
votes
1 answer

LXC/LXD error: Can not change LVM config. Images or containers are still using LVs:

Requirement: Create two trusty containers each on its own disk so I could setup a 2-node mongodb replica set. My idea was to create two LVM volume groups so that each container owns its own volume group (and disks…
sgireddy
  • 155
  • 10
0
votes
1 answer

lxc create unprivileged containers

I've installed lxc for create containers and I've done the commands for create unprivileged containers but I've this errors when I do: [andrea@andrea lxc]$ lxc-create -t download -n prova0 lxc-create: conf.c: chown_mapped_root: 3406 No mapping for…
0
votes
1 answer

Are there any use cases where merging the namespace in containers can be useful

Containers use the namespace isolation feature. It offers a lot of advantages like security,etc. Different namespaces in linux can be Network, Pid, Ipc, Mount,etc. I have to implement a feature for LXC containers where any particular namespace can…
Coffee_lover
  • 545
  • 6
  • 15
0
votes
0 answers

Setting specific mac address in docker

I'm trying to set a specific mac address in docker using the following command but it's not working docker run --lxc-conf="lxc.network.hwaddr=ec:g6:bb:98:9c:d3" -i -t 0d14 anyone see anything wrong with the command above ?
Noor
  • 19,638
  • 38
  • 136
  • 254
0
votes
1 answer

Suggestion on optimizing the repetitive installation of packages in new lxc

As part of each test run we need to create new ubuntu lxc and install set of 10-15 packages(using apt-get install and pip install). The installation of additional packages add 5-minutes of run time. Is it possible to have customized lxc images with…
user245011
  • 65
  • 1
  • 9
0
votes
1 answer

Do I need to create a new lxc(docker)-container for each task I want to sandbox?

I need to develop backend for programming competition. Users submit their codes to the server and we want to run codes in the sandbox, so they won't be able to affect neither the server nor each other. The question has two parts: 1. Is that correct,…
Kamerer
  • 77
  • 1
  • 1
  • 7
0
votes
1 answer

how to access mongodb deployed insde lxc container

I have been playing with lxc-lxd. I was able to install mongodb within an lxc container (ubuntu 15.04). I was able to access everything from within the container but not the otherway around. The container & lxc-bridge were being given 10.x.x.x ip…
sgireddy
  • 155
  • 10
0
votes
1 answer

How to create lxc containers in ubuntu 14.04 using Ansible module?

I am trying to create a lxc container by using lxc_container module provided by ansible. Can someone tell me the exact playbook task which will just create the lxc container ?
Nishant Singh
  • 3,055
  • 11
  • 36
  • 74
0
votes
1 answer

nfdc register command in NDN

I am using NDN (Named Data Networking tool). I have installed ndn and nfd on two linux container nodes with ip addresses. 10.0.0.1 and 10.0.0.2. The two nodes can ping each other. However, after starting nfd + nrd on the nodes, I get the following…
shoaib
  • 1
  • 1
0
votes
1 answer

Error when building a Docker container

The command docker build fails with error : Error getting container f43128eda488c88a3b2e111aafb30b80a44faaead33bcf02f8bffd7ae1832753 from driver devicemapper: Error mounting…
Porfus
  • 129
  • 1
  • 1
  • 7