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”.

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

How to start dota2 on ubuntu in an unprivileged lxc container, since steam starts dota2 now in a runtime sandbox

Since the latest update, steam starts some linux games in a sandbox. If you have steam in an lxc container, so it does not install libs in your main OS or you want to isolate it from you work files, ...
user avatar
1 vote
1 answer
35 views

How to save the state of a running LXC container?

Using VirtualBox or KVM, I can save the state of the guest VM, reboot the host and then resume the guest.How can I do that if my guest is only a container and not a VM ?
user avatar
  • 408
0 votes
0 answers
84 views

wireguard + working lan in a routed lxc container

I have an issue with my wireguard tunnel. Im trying to set it up in a routed lxc with the lan intact. The containers networking works fine but im showing the config so you can see. The issue is that i ...
user avatar
0 votes
0 answers
48 views

After removing lxc device, still managed to access device from its boundary directory

I am using Lxd container for my sd card access in Linux based device. i mounted sd card with following commands mount /dev/sda1 /mnt/flash/sdcard. lxc config device add dhaneesh2 sda disk path=/mnt/...
user avatar
1 vote
0 answers
16 views

Daemon lxd-client client is not running

I have a problem with my init service. After I started the service lxd-agent I tried to check its status. I can see in the output of /etc/rc.d/rc.lxd-agent status below message: daemon: lxd-agent is ...
user avatar
  • 11
1 vote
1 answer
40 views

How to add home folder to user without one

I have a lxc container. I connect to it with sudo lxc-attach 100 which works fine. but I want to use it as a deployment target for jenkins (I know that I could use docker, but I haven't gotten that ...
user avatar
  • 306
0 votes
1 answer
92 views

Is it possible to build Linux kernel inside an LXC container?

I would like to build an optimized kernel for a machine that runs Ubuntu 20.04 but in my scenario I cannot "pollute" the Linux installation with all the dependencies required to do the build....
user avatar
1 vote
1 answer
112 views

how bind Dummy network interface od alias ip an LXC guest without bridge?

i search any way to bind second public or lan ip direct with Dummy Iface or Alias ip to LXC container WITHOUT bridge interface. any idea and config example? (debian) ip link add eth2 type dummy' LXC ...
user avatar
2 votes
1 answer
105 views

How LXC (Linux Containers) differ from Docker?

I am wondering if LXC and Docker does the same thing (Operating System level virtualization) What are the advantages/disadvantages one have over the other? I also want to know for a low power arm ...
user avatar
0 votes
0 answers
107 views

Wireguard handshake is unstable, and I don't know why

I tried using Wireguard on a Ubuntu LXC container in Proxmox. The handshake does not fail but is very unstable. If I connect to the server there can be multiple seconds until the handshake completes. ...
user avatar
0 votes
1 answer
52 views

How to attach to linux container started with systemd?

Long story short, I have a few unprivileged containers that run on boot that I used to be able to start from rc.local. That no longer works, and currently start them with a systemd unit. They start, ...
user avatar
1 vote
1 answer
336 views

Create a LXD CentOS container

With lxc1, lxd and lxd-client installed I can launch a ubuntu based container with lxc launch --profile default ubuntu:18.04 c1 I was wondering if it is also possible to lauch a container based on ...
user avatar
  • 727
1 vote
0 answers
63 views

Access container's wireless network from host

I have linux setup on embedded device with many lxc containers. Container A has in its network namespace wlan0 interface (I moved wlan0 from host to container by writing to A's config: lxc.net.0.type =...
user avatar
  • 11
0 votes
1 answer
215 views

Make host IPv6 only and assign its sole public IPv4 to LXC container

I have a Debian 10 server which gets its IPv4-v6 via DHCP which can be configured as static also: root@host:~# ifconfig ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet ...
user avatar
  • 43
0 votes
1 answer
400 views

How to load the kernel module to lxc container?

lxc containers do not have their own Kernel so is there possible way to load the kernel into lxc container?
user avatar
  • 77
0 votes
1 answer
275 views

It is possible to set up DRBD on lxc container?

The purpose is I want to set up DRBD to run on lxc container but it looks like different from the physical server because drbd requires to syn from a block device but it does not have in lxc container....
user avatar
  • 77
0 votes
1 answer
1k views

How do I take advantage of FreeIPA centralized authentication in an LXC container under Proxmox?

I'd like to request assistance with an issue I'm having in my Proxmox homelab. I have a FreeIPA domain lab.ads1031.local, in which resides a user ads1031 with UID 1000001. I would like to log in as ...
user avatar
  • 61
0 votes
1 answer
332 views

Debian 10 - static route doesn't override default

My /etc/network/interfaces: auto lo iface lo inet loopback auto wan iface wan inet static address $myPublicIP netmask $ispSubnet gateway $ispGateway auto vpn iface vpn inet ...
user avatar
2 votes
1 answer
3k views

Increase the LXD/LXC Btrfs loop file storage pool size

Our production container crashed because its LXC storage pool is out of space. Here is dh -h from inside the container: Filesystem Size Used Avail Use% Mounted on /dev/loop0 82G 78G 2....
user avatar
  • 310
1 vote
0 answers
188 views

Creating docker image from lxc container tar file

i am trying to create a docker image from an lxc_container tar file, i am able to import it using the docker import command sudo docker import ./app.tar i was able to import it and run it, docker ...
user avatar
  • 11
0 votes
2 answers
319 views

A Docker OS container - why?

If Docker is an application container (unlike a system container like LxC), and is to be used for running only one app/service, I wonder what good is a full, Docker OS container, say, for Ubuntu? Any ...
user avatar
  • 739
1 vote
1 answer
223 views

openstack ansible deployment fail after creating lxc containers while running apt-get update command inside container

The openstack ansible created containers where running but they don't have access to internet. When I manually add routing then I get following error: Err:1 http://archive.ubuntu.com/ubuntu bionic ...
user avatar
  • 111
0 votes
1 answer
250 views

Ubuntu LXD iptables SNAT / Masquarade

i have Ubuntu Server with LXD. Every Container has own IP (local)address. Example: LXD Host: 10.10.1.200, DNS container: 10.10.1.141, LXC inside address: 10.71.85.107 Ok - that no problem, incoming ...
user avatar
  • 1
1 vote
1 answer
585 views

LXC start/stop hangs and filesystem sync hangs

edit: The issue was my umask being set to 027 rather than the default of 022. See below for details. I'm experiencing a bewildering (set of) issues regarding LXC that manifests itself throughout the ...
user avatar
  • 11
1 vote
1 answer
2k views

reboot command in a Linux Container, does it just reboot the container?

I am using several remote Linux Containers that I access with SSH (PlanetLab to be specific). Sometimes they work unreliably so then I issue the command sudo reboot . What I wonder, will this restart ...
user avatar
0 votes
1 answer
381 views

Identify host of lxc containers when connecting via ssh

I have plenty of servers (>100), mostly centos, ubuntu and some windows servers, monitored with Zabbix. Many of those servers are virtualized with vanilla LXC version 2 or version 3 (no libvirt, no ...
user avatar
0 votes
1 answer
377 views

How to disable lxc container login prompt on centos 7

I have created an LXC container on CentOS 7. Every time I do sudo lxc-start -n mycontainer I'm greeted with a login prompt: ... [ OK ] Started Console Getty. [ OK ] Started Command Scheduler. [ ...
user avatar
  • 277
-3 votes
1 answer
482 views

Empty passphrase created ssh key-pair refusing empty passphrase when authenticating [closed]

After @Sarke help I reach that solution: Here the fixed version, the original broken version cant help nobody. About why I need to be able to SSH from one container to the other it that i need ...
user avatar
  • 1
0 votes
1 answer
39 views

LXC: how this network works?

I don't understand why I can ping between 10.0.3.* and 192.168.1.* if are in different subnets. I search for it but I don't find any that clarifies it to me. I would appreciate any help, docs, ...
user avatar
4 votes
2 answers
2k views

htop memory usage does not add up with process list

I am using lxd to run multiple containers and having trouble reporting the memory usage: both htop and free shows high memory usage but the list of processes that uses memory is very short and doesn't ...
user avatar
4 votes
1 answer
959 views

How to create a linux container which inherits the hosts root file system, possibly with zfs?

What Hopefully the question in the title makes sense. I am wanting to create a low overhead (therefore no virtual machine) copy of the host operating system, with it running in a linux container. I ...
user avatar
  • 672
0 votes
1 answer
893 views

PREROUTING to LXC container with iptables

I've set up two containers with lxd, one with haproxy, pointing to the other with nginx. I want my server's incoming traffic on port 80 to go to the container with haproxy. This is the rule I've ...
user avatar
2 votes
1 answer
481 views

Running containers on top of QEMU

I have a testing setup I'm trying to migrate to using VMs rather than bare metal as much as possible. The existing setup is structured to run everything within containers (LXC, specifically), and it ...
user avatar
0 votes
1 answer
5k views

Internet access from LXC containers in proxmox 5.1 on VirtualBox

I've installed a Proxmox VE 5.1 on a VirtualBox in macOS (10.12). The guess OS, Debian Strech (Proxmox is built on debian), has 2 "physical" network interfaces (configured from VirtualBox), Host-Only ...
user avatar
  • 109
1 vote
1 answer
201 views

Is there a way to redirect traffic to another port in the event that the service listening to the original port is unresponsive?

This is a rather specific question, but it is one I haven't been able to find an answer to. I'm running a set of services on an LXC container in Ubuntu 16.04 LTS, specifically game servers. However, ...
user avatar
0 votes
1 answer
797 views

Accessing LXC root User

I am new to containers and am trying figure them out. I cannot figure out how to log in as root user on the container. I cannot get it to accept the temporary password or to change the password. (...
user avatar
0 votes
1 answer
261 views

Prevent LXC container from remounting host file system

Recently, I started looking at LXC as a virtualization platform. I have already created a container, and set it up to use via libvirt. This works so far, but when I shut down the container, /var/lib/...
user avatar
0 votes
1 answer
106 views

Tee causes format problems at console when running lxc-attach commands in session

I use tee to capture output of an install script to a file in the usual way. All is fine except when there lxc-attach commands executing in an LXC Linux container. For example (see attached ...
user avatar
0 votes
1 answer
2k views

How to ssh from one lxc container to another?

I'm trying to experiment with a small virtual cluster of machines to learn hadoop. I'm using LXD for this purpose. I've installed ssh servers on each vm and now need to connect from one vm to another. ...
user avatar
  • 172
3 votes
2 answers
6k views

Copy files from LXC to host machine

I'm new to containers. I have a LXC container running on a remote linux machine. All I found online is how to copy files from host to LXC container. But how can I copy files from a running LXC ...
user avatar
  • 489
0 votes
1 answer
684 views

LXD container on GlusterFS

I'm trying to add a container created with LXC (v2.0) into a GlusterFS (v3.12) mount. So I tried to mount /var/lib/lxd/containers prior to creating the container, obviously I got the error message ...
user avatar
  • 111
0 votes
1 answer
1k views

Unable to SSH to LXC Ubuntu container

I'm trying to connect from a CentOS host to my LXC Ubuntu container and it fails with this error: packet_write_wait: Connection to 192.168.122.92 port 22: Broken pipe The CentOS I'm using is: ...
user avatar
  • 101
0 votes
0 answers
791 views

LXC: Linux devices don't work within container

With Debian lenny I am desperately trying to get LXC working (Debian kernel 3.16 and LXC 1). One big issue is the use of device nodes. I use lxc.autodev and lxc.cgroup.devices.allow and my config ...
user avatar
  • 565
1 vote
1 answer
414 views

existing filesystem error on adding old btrfs storage volume into new ubuntu lxd install

lxc storage create default btrfs source=/dev/sdc error: Failed to create the BTRFS pool: /dev/sdc appears to contain an existing filesystem (btrfs). ERROR: use the -f option to force overwrite of /dev/...
user avatar
2 votes
0 answers
196 views

Group containers in LXC

It's possible to group lxc containers in some kind of hierarchical folder structure? I means set a group_containers folder in /var/lib/lxc in such a way you could have /var/lib/lxc/container_1 /var/...
user avatar
2 votes
2 answers
4k views

Forcing Ping to Egress When Destination Interface is Local (Debian)

I am running a Debian-based Linux container under Proxmox 4.4. This host has five network interfaces (though only two come into play in the problem I'm having). While I am shelled into this host, I ...
user avatar
  • 839
1 vote
1 answer
106 views

Multiple instances of an application on the same X server?

I'd like to run multiple instances of firefox in lxc containers, using ssh X forwarding: ssh -X container-IP firefox It works perfectly if this copy of firefox is the only one. If I previously start ...
user avatar
1 vote
1 answer
1k views

Resolving names of LXC containers on the host

On Ubuntu 16.04 server edition, after launching an LXC container, it can only be referred to by its IP address. Enabling the .lxc domain in dnsmasq doesn't seem to help, and tutorials available only ...
user avatar
0 votes
2 answers
861 views

How to make cmake find installed packages

I am trying to use cmake to compile a program and it needs to use lxc, I run the cmakelist with cmake .. and it returns -- checking for module 'lxc' -- package 'lxc' not found. However, if I run apt-...
user avatar
  • 135
4 votes
1 answer
5k views

How to run openvpn in a LXC container inside debian host?

I am running debian stretch on my host and I try to configure openvpn inside an Ubuntu xenial LXC guest. Because openvpn needs a tun device, I followed guides such as http://heider.io/blog/2013/10/26/...
user avatar
  • 91