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
0 answers

Docker service starts in LXC but cannot execute commands

I have a software application that creates LinuX Containers as virtual hosts. In these host(s), I want to start the docker service and run it. So I initialize the lxc and open up a terminal. I enter service docker start and get the message *…
kplax
  • 85
  • 1
  • 5
0
votes
1 answer

How to run LXC Ubuntu container on arm64 board

I need to run LXC Ubuntu container on my embedded board(ARM64).I used following command to create a ubuntu container. lxc-create -n ubuntu01 -t /usr/share/lxc/templates/lxc-ubuntu --lxcpath=var/lib/lxc. But when i execute the above command it shows…
Sreejin K
  • 41
  • 4
0
votes
0 answers

How to run a simple Hello World node js application in Ubuntu LXC container?

I have a nodejs application - express app. My use case here is I need to run the node js application inside a LXC container in ubuntu. I need to understand how a simple nodejs app works in a container so that I can move onto porting my express…
Shaik Syed Ali
  • 3,359
  • 3
  • 17
  • 22
0
votes
1 answer

How to install node modules (express, typescript, ws etc) inside Ubuntu LXC container?

I have a typescript application which is in turn a express web application and uses ws module for socket operations. My use case here is, I have to run the typescript application inside a LXC container in Ubuntu. I have created a container using…
Shaik Syed Ali
  • 3,359
  • 3
  • 17
  • 22
0
votes
1 answer

How to set lxcpath in config files?

I have put lxc.lxcpath=/my/path into /etc/lxc/lxc.conf and /usr/local/etc/lxc/default.conf but when I run lxc-config lxc.lxcpath it still shows a different path. How can I set the lxcpath? This is with lxc2.1.1 installed from sources.
blues
  • 4,547
  • 3
  • 23
  • 39
0
votes
0 answers

Display remote Android apps running in LXC to a smartphones

I’m currently working on a project where I want to be able to allow users to access Android apps without downloading. Current setup using LXC containers I’m doing this by running LXC containers with Android OS installed on a server (remote). Desired…
0
votes
1 answer

Ansible + LXC (Proxmox)

Problem: to create the LXC (Proxmox) in ansible playbook. Playbook: - name: Create LXC proxmox: node: PVE-03 api_user: root@pam api_password: password api_host: 192.168.254.23 password: 11111 hostname: ans ostemplate:…
user10888638
0
votes
0 answers

LXC, Ubuntu Container - Having problems with a package while installing libraries

I tried installing libraries for a Unix benchmark to test my ubuntu LXC container when i get this return at the end. Command: ubuntu@BenchLXC2:~$ sudo apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make git grc Result (at…
0
votes
1 answer

Live backup lxc container

I know multiple ways to backing up a lxc container, but all of them, as far as I see, involve stop the container first. I would like to know if there is a way to make a live backup of the containers of course without stopping it.
amh9412
  • 79
  • 1
  • 11
0
votes
1 answer

is it possible to get notified when lxc container (unprivileged) is stopped

I want to run simple shell script when lxc container is stopped. I try to use lxc.hook.post-stop = script I want to execute in my lxc container config file, but the script is not being invoked when the lxc container is stopped. Is there any other…
Yasoda
  • 11
  • 3
0
votes
1 answer

DHCP of LXC on Proxmox doens't work

I give up, for days I have trying to figure it out. So any help will be very welcome. I have a Proxmox virtualization server and everything works fine, except that none LXC (Linux Container) can get an answer from the DHCP server. I have the…
0
votes
0 answers

Error: permission denied while mysql_intstall_db

I tried to install mariadb on blank Alpine Linux 3.6 in LXC container hosted on Turris OS (OpenWrt omnia 15.05 r47055). Installation failed on permision denied error. I change privilegs but instalataror still failure. root@alpinelxccontainer:~#…
0
votes
1 answer

Error creating ubuntu 16 container under arch

I am trying to install a Ubuntu container on Archlinux using LXC. I am following this guide:https://gist.github.com/manoj23/8a35849697945896cdaef77927c695a7 After I run this command: lxc-create --name=ubuntu-16 --template=ubuntu -- --release xenial …
Rashik
  • 1,014
  • 2
  • 16
  • 36
0
votes
0 answers

How can I create a custom sized disk using LXC

Good day, I have been looking through a lot of documentation and nothing really appears to confirm how to expand the disk size of the the LXC containers that I am spinning up.. Here is what I have tried so far, I warn you the items below look…
LUser
  • 1,127
  • 4
  • 23
  • 39
0
votes
1 answer

SSH : "Connection reset" for one of my LXC's

I've been stuck for a while about my ssh connection to one of my LXC's. Indeed, when I connect in ssh to my other LXC, everything works. However, one does not want to connect and displays this error: ssh root@mysite.lxc Connection reset by…
Paul
  • 352
  • 3
  • 6
  • 17