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”.
429
questions
127
votes
10
answers
90k
views
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 ...
80
votes
7
answers
202k
views
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 ...
79
votes
14
answers
230k
views
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 ...
57
votes
4
answers
20k
views
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 ...
43
votes
6
answers
57k
views
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 ...
37
votes
6
answers
38k
views
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 ...
22
votes
4
answers
18k
views
Is it possible to start LXC container inside LXC container?
Is it possible to start LXC container inside another LXC container?
18
votes
5
answers
56k
views
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 ...
17
votes
4
answers
29k
views
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 ...
16
votes
2
answers
17k
views
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 ...
15
votes
3
answers
54k
views
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 ...
15
votes
1
answer
41k
views
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 ...
14
votes
5
answers
8k
views
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 ...
13
votes
3
answers
9k
views
Microsoft Windows equivalent to LXC
Does Microsoft Windows have any equivalent product similar to Ubuntu's LXC container virtualization technology?
13
votes
3
answers
10k
views
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 ...
13
votes
1
answer
16k
views
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/...
12
votes
8
answers
10k
views
How to auto-start unprivileged lxc containers?
On Ubuntu 14.04, I have created an unprivileged container that I can manually start and stop.
But I would like this to start and stop along with the system.
I have added the following to the ...
12
votes
3
answers
10k
views
Proper way of handling LXC containers on btrfs
Lets say we have one server with lxc installed, and a lxc container used for as a base img /var/lib/lxc/ubuntu_base. For simplicity let's forget the config changes after copying the base img.
some ...
12
votes
1
answer
16k
views
How to create /dev/tun device inside unprivileged LXC container?
This question is similar to No tun device in lxc guest for openvpn . The LXC has evolved and the unprivileged LXC containers were introduced recently that offer another layer of security against ...
10
votes
3
answers
7k
views
Why are applications in a memory-limited LXC container writing large files to disk being killed by the OOM?
EDIT2: This problem appears to exist as well under 3.8.0-25-generic #37-Ubuntu SMP
EDIT: I modified the question from the original title of "Why would the Linux Out of Memory manager be triggered by ...
10
votes
3
answers
19k
views
LXC container not starting
My CentOS LXC containers are not starting anymore on an Ubuntu 14.10 machine. I think that the problem started after a reboot, but I am not sure.
I had a similar problem after an yum update, when the ...
10
votes
1
answer
3k
views
Can I use a different linux distribution in an LXC container?
We are developing a server product targeted for Debian Lenny (and some others). However, due to driver needs, developers' personal choices etc. we run Ubuntu (12.04) on the hardware.
Is it possible ...
9
votes
3
answers
5k
views
Explain in Plain English what is LXC and for what it is useful [closed]
What is LXC?
For what it is useful?
What are the differences between LXC and common virtualization?
9
votes
2
answers
18k
views
Limit memory and cpu with lxc-execute
I would like to isolate processes using lxc-execute. Is it possible to set bandwidth, cpu and memory limit?
I had a look in the man of lxc.conf but I did not find it exhaustive.
9
votes
3
answers
8k
views
use LXC under heavier virtualization (Xen, KVM,Hyper-V,VMVare)
Is it possible to use LXC under heavier virtualization (Xen DomU, KVM, Hyper-V, VMVare) ? I would like to use it as security (isolation) tool, the ability to limit resource consumption is not priority ...
9
votes
3
answers
5k
views
Why LXC when there is linux-vserver?
I am no LXC expert, but as far as I know it is really similar to linux-vserver.
If that is correct, I wonder why there is another player in the already crowded virtualization camp? What does LXC ...
9
votes
2
answers
30k
views
Bridging LXC containers to host eth0 so they can have a public IP
UPDATE:
I found the solution there:
http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge#No_traffic_gets_trough_.28except_ARP_and_STP.29
# cd /proc/sys/net/bridge
# ls
bridge-...
9
votes
6
answers
35k
views
LXC, Port forwarding and iptables
I have a LXC container (10.0.3.2) running on a host. A service is running inside the container on port 7000.
From the host (10.0.3.1, lxcbr0), I can reach the service:
$ telnet 10.0.3.2 7000
Trying ...
8
votes
2
answers
6k
views
How to prevent docker-compose appending hashes to created container names?
I have a server with several lxc containers. In some of the containers there is a docker installed. Usually a docker compose action in these LXC containers results in container names with the format ...
8
votes
1
answer
2k
views
Do I need a CPU that supports Virtuallization to do Containerization?
I've read that Containerization is cheaper than virtualization; I know that containerization uses less resources than virtualization since there's only one OS involved and no virtualized hardware.
...
8
votes
3
answers
13k
views
Accessing LXC container's filesystem from host
I'm looking for a way to access the container's rootfs from the host. While I could just use the directory that was passed to lxc.rootfs, it doesn't have the mounts that the container has, so there ...
8
votes
2
answers
4k
views
Is LXC secure enough for VPS hosting?
Right now I'm using Linux VServer for VPS hosting. But it's lacking some functionality I need (ex. cpu usage virtualization, quota support for guests, etc.) so I'm thinking about switching to OpenVZ ...
8
votes
3
answers
554
views
Technology for short-lived private VMs
I'm trying to build a system that will run short-lived (CI and test builds) of software components, it's mandatory according to my requirements that each live on a private host. I'm taking that ...
7
votes
2
answers
9k
views
Running linux containers (lxc) on ubuntu to isolate web server processes (ruby/thin)
I am trying to setup a server where I would be running multiple apps. Mostly internal but could also be open source projects like Redmine. They would all be Rails/Ruby apps/test scripts running on ...
7
votes
1
answer
2k
views
Why are cgroups (blkio serviced bytes) and iotop producing diverging results
I work with lxc user space tools on ubuntu 14.04 and I want to perform some stress tests and benchmarking within a container. I know that free and htop are not working properly in a container.
I am ...
7
votes
2
answers
4k
views
LXC instances do not have IPv4 addresses
I've had limited success in having LXC instances acquire an IPv4 address. It has worked at creation, but if I reboot the host, all addresses are lost.
Host Ubuntu 21.10
Client version: 4.21
Server ...
6
votes
3
answers
12k
views
Copy lxd containers between hosts
I've installed lxd on two ubuntu hosts that can only communicate via an intermediate server (on which I don't have su privileges). I've created a container on my localhost and now wish to load the ...
6
votes
2
answers
4k
views
What is the difference between containers and virtual machines?
I want to comprehend all that differ a container from a virtual machine. A filesystem with all operational system can be observed for both of these virtualization methods. But in a Docker container, e....
6
votes
2
answers
14k
views
How to migrate a regular LXC container to a Proxmox LXC container?
How do you migrate a regular LXC container (from another or the same server) to a Proxmox LXC container, which can be accessed via the Proxmox web GUI?
For example, I have a container created by ...
6
votes
1
answer
10k
views
unprivileged_userns_clone no such
I am trying to setup unprivileged LXC containers as explained in Debian Wiki on a Jessie Debian physical server (4.9.135 kernel). Hence, I want to enable the userns namespace:
sysctl kernel....
6
votes
1
answer
6k
views
Cannot port forward with UFW on Ubuntu
I am trying to get port fowarding to work to expose a LXC container, when using ufw on Ubuntu, but to no avail. I have constructed the following workflow from guides around the Internet ([1][2][3]); ...
6
votes
2
answers
9k
views
No network connectivity in the LXC container set up in the "routed" mode
I'm experimenting with lxc/lxd in Vagrant, but i'm quite new to it. I managed to create running container, but I cannot ping anything (including 8.8.8.8) from inside of it. I can ping its IP from my ...
5
votes
1
answer
25k
views
Proxmox. ERROR: Backup of VM failed - CT is locked (backup)
I tried to create backup of the container (LXC) in my Proxmox and I get the error:
INFO: starting new backup job: vzdump 206 --node my_server --mode snapshot --storage backups-stor --remove 0 --...
5
votes
3
answers
24k
views
What is required to activate cgroups in Linux
I have a Debian squeeze kernel (linux-image-2.6.32-5-openvz-amd64) which according to the Doku should support cgroups. When I look into the kernel configuration, it does (or is some other kernel ...
5
votes
2
answers
1k
views
Does LXC container performance depends of host load?
I am wondering if LXC could offer a full isolated benchmarking environment.
Let's say we have 2 identical machines, with the same fresh Linux and without network connection.
First machine has a load ...
5
votes
2
answers
4k
views
lxc bandwidth control using tc
I am trying to restrict bandwidth inside my containers.
I have tried using the following commands , But I think it is not getting effective.
cd /sys/fs/cgroup/net_cls/
echo 0x1001 > A/net_cls....
5
votes
1
answer
13k
views
How to set DHCP IPs of standard LXC containers?
When you create some containers on a host, e.g.:
sudo lxc-create -n container1 -t ubuntu
sudo lxc-create -n container2 -t ubuntu
the LXC system creates IP address for the hosts on a new subnet, e.g. ...
5
votes
1
answer
3k
views
Running LXC and Docker on the same host
I'm running a private server for a some time now and back when I set it up, I used LXC to separate the different services from each other.
About a month ago I've started to use docker (for work as ...
5
votes
4
answers
10k
views
Running systemd based container in LXC
I'm currently trying to run an Arch Linux container using LXC on an Ubuntu 12.04 host. Arch Linux has recently migrated to systemd, which according to a variety of places has some problems operating ...
5
votes
1
answer
6k
views
LXC container with bridge networking exposes fake MAC address to external network
I'm running LXC container (lxc 0.7.2-1) on Debian squeeze with bridge networking configured by the book with public IP and I have problem that it exposes fake MAC address from LXC container to ...