Questions tagged [lxc]

Linux Containers (LXC) is a userspace interface for operating system-level virtualization features in the mainline Linux kernel, such as kernel namespaces and control groups (cgroups). These allow multiple distinct user space instances to be run on a single kernel. Note: the 3 letters "lxc" command is part of LXD, not LXC. Please use the LXD tag if your question is about LXD rather than only about LXC.

Filter by
Sorted by
Tagged with
1 vote
1 answer
68 views

Is it possible to use a file as Filesystem?

Here is the origin of my question: I'm running Linux containers with LXD snap version at Ubuntu 22.04 on a VPS. The root file system of the VPS is Ext4 and there is not additional storage attached. ...
user avatar
  • 121
0 votes
1 answer
26 views

Running closed source scientific software

Suppose you are required to install a heavy scientific software like Matlab or Intel Quartus on your Linux workstation. This can become a broader enquiry, for any kind of closed source software (...
user avatar
  • 11
0 votes
0 answers
420 views

dmesg: read kernel buffer failed: Permission denied with root user in LXC container after Ubuntu upgrade

I had an LXC container running in Proxmox with Ubuntu 21.04. In this container dmesg worked as expected with a root user. I used do-release-upgrade and successfully upgraded the LXC container to ...
user avatar
  • 101
0 votes
2 answers
239 views

Cannot autostart unprivileged LXC containers on Debian 11 Bullseye

lxc-autostart won't start unprivileged containers in Debian 11 Bullseye. Start of unprivileged container in Debian 11 Bullseye was solved in this answer by using lxc-unpriv-start instead of lxc-start ...
user avatar
  • 11
0 votes
0 answers
239 views

systemd-logind.service doesn't work (NAMESPACE error)

The problem that occurred to me goes as follows. I became the admin of a recently launched Linux machine. The specs are: Kernel: 5.13.19-1-pve OS: Debian GNU/Linux 11 (bullseye) At first, I noticed ...
user avatar
0 votes
0 answers
76 views

Redis-server does not work properly on debian bullseye in lxc

I have a server with debian 10.11 (buster) and lxc (from debian repos, 1:3.1.0+really3.0.3-8) installed. When I create a new lxc container (bullseye) (using lxc-create -t download -n redis-container --...
user avatar
0 votes
0 answers
66 views

How to use screen inside of an LXC container

I am using Proxmox 7.0 to run an LXC container with Debian 11 as guest. When connecting via ssh to the guest, I can install and run screen as usual. I can detach and re-attach as usual. But if I ...
user avatar
  • 242
0 votes
0 answers
70 views

How `xorg` and `xinit` are affecting my displays on host and in container:

Very brief summary: Either I can launch containerized GUI apps, or I can configure my display positioning, but not both. Part 1: i3 display configuration vs xorg display configuration. Resolved but ...
user avatar
0 votes
1 answer
102 views

Connection refused between 2 linux containers

On my host Ubuntu 18.04 I am running two lxc containers using default setups. Containers use Ubuntu 18.04 as well. I have an app running on container1 that offers an https based service on https://...
user avatar
  • 141
0 votes
1 answer
538 views

How can I display a GUI LXC container on a physically connected display without a window manager?

I want to have a setup where I have LXC OS containers that start full-screen on particular displays. As an intermediate step, I am trying to get X apps from the container to display via host X. I have ...
user avatar
0 votes
0 answers
87 views

LXC Debian 11 Container Launch Problem

Debian 11 stable, LXC from debian repo. lxc-create -t download -n my-container error lxc-create: my-container: conf.c: write_id_mapping: 2694 Operation not permitted - Failed to write uid mapping to &...
user avatar
0 votes
0 answers
38 views

Cannot enable X11 socket on an unprivileged LXC container

I have created an unprivileged lxc container using the following config: # Template used to create this container: /usr/share/lxc/templates/lxc-download # Parameters passed to the template: --dist ...
user avatar
  • 131
0 votes
0 answers
65 views

Mount disk: permission denied

I'm unable to write anything to /var/cache/distfiles directory. gentoo1 ~ # touch /var/cache/distfiles/abc touch: cannot touch '/var/cache/distfiles/abc': Permission denied My container config: ### ...
user avatar
0 votes
0 answers
47 views

How to build custom Linux image

I want to build custom Gentoo image, one based on hardened+nomultilib stage, and another one based on hardened+nomultilib+selinux stage. I’m going to setup own binary package server on Gentoo in the ...
user avatar
0 votes
0 answers
29 views

LXD Container fails to SSH out to AWS

Workstation -> Local LXC -> AWS I have copied over the .ssh keys and config from my main workstation into an LXD container on it. I have also cleared my ip tables which was an issue with docker ...
user avatar
0 votes
1 answer
84 views

How can I fix etckeeper or uninstall it so apt will install / remove new packages?

OS: Debian Buster 10.10 inside lxc I am attempting to install a new package (I tried different packages) and apt (and DPkg) is complaining with the following error message(s): /etc/etckeeper/pre-...
user avatar
3 votes
1 answer
2k views

Cannot start unprivileged LXC containers on Debian 11 Bullseye

I've made a new installation of Debian 11. Regarding LXC, I copied the working setup of my Debian 10 computer. I use a separate user, lxcuser which I su to, to lxc-start. The configuration, ~/.config/...
user avatar
  • 2,211
0 votes
0 answers
319 views

How to route LXC container traffic through Wireguard tunnel?

The image shows a complete picture of what I'm building. But for now I want to implement a small part with one home server and 2 LXC, 2 ipv4 on a remote server. I want to use 2 different Wireguard ...
user avatar
  • 1
0 votes
0 answers
69 views

How to assign a remote public ip (via wireguard) to lxc container

What I have: lxc host # ifconfig wg1: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420 inet 192.168.7.2 netmask 255.255.255.0 destination 192.168.7.2 ... enp2s0: flags=4163<UP,BROADCAST,...
user avatar
  • 1
0 votes
0 answers
30 views

How to attach 10 ipv4 from remote server to home lxc containers?

There is a remote ubuntu server with 10 ipv4. There is a home ubuntu server without external ipv4. The home server has 10 lxc containers.
 How to make each lxc container has own ipv4? Upd I want to ...
user avatar
  • 1
1 vote
0 answers
35 views

LXC container bridge with host network risks?

I'm new to LXC containers and still very much learning what is what. I want to run a container bridged to the host network (e.g. 192.168.0.0). This is required because the application I want to run ...
user avatar
  • 424
0 votes
1 answer
50 views

lxc containers can ping host and can resolve dns internet addresses but cannot get to the internet

Debian Buster amd64 Two containers, 192.168.122.2,3 both can resolve but cannot get to the Internet Both containers can ping / interact with the host server. Here is what I have in iptables. # ...
user avatar
1 vote
1 answer
179 views

Command executing outside container with lxc-attach?

I am trying to do a more complicated task inside a running lxc ubuntu container, but my problem can be explained using this simple example. When I run sudo lxc-attach -n container1 -- echo "test&...
user avatar
1 vote
2 answers
921 views

lxc-start tells me apparmor_parser not available even though apparmor is installed and running

System:Debian Testing (Bullseye) I am trying to get an LXC container up and running as per here, however, when I get to lxc-start -n my-container -d I get the following: $ lxc-start -n test1 -d lxc-...
user avatar
1 vote
1 answer
162 views

It is possible to use parallel compression method in lxc publish?

To generate images LXD compresses files using gzip, which can only use one core. Thus, creating images can be very slow with large containers. I would like to use other compressors (e.g., pigz). What ...
user avatar
0 votes
1 answer
91 views

Is possible to identify the LXC unprivileged container owner of process?

I have a linux server, Debian buster with LXC configured for unprivileged containers. I have also a lot of crash from sssd_be, dmesg from server said: dmesg|grep segfault sssd_be[6739]: segfault at 8 ...
user avatar
  • 10.9k
1 vote
0 answers
347 views

Start armv7 container on arm64 with lxc / lxd

I installed Ubuntu 20.04 on my Raspberry PI, which has an arm64v8 architecture (but could be on any other debian arm distribution / hardware). Currently I compile a program for several arm ...
user avatar
  • 111
0 votes
1 answer
67 views

Why this script works fine if run as user, but faili if run from rc.local?

I have some troubles with lxc unprivileged containers on Debian. I follow this method: a)I create the user unprivileged with home in /var/lxcunpriv useradd -m -d /var/lxcunpriv lxcunpriv b)I install ...
user avatar
  • 10.9k
1 vote
0 answers
444 views

Run KVM inside LXC container

I have a baremetal server with Debian. Iside it I have KVM-based VMs and LXC containers. Now I am searching a solution to run KVM inside LXC container.
user avatar
2 votes
1 answer
716 views

LXC, Docker and iptables on the same host, timeout on port-forwarding from the container to the container

thanks for reading! I have a publicly exposed server (debian 10), used as an host, running both LXC (not LXD) and Docker. These two container services are running with a mostly original configuration (...
user avatar
2 votes
0 answers
277 views

Solution: How come that lxc-attach doesn't work within su -c?

I have an unprivileged lxc container. It works well and if I need to do something within that container, I su --login lxc-user, then I do lxc-attach -e -n lxc-container for e. g. doing updates ...
user avatar
1 vote
2 answers
1k views

disk quota exceeded when trying to deploy Docker container inside LXC

I have an LXC container running docker. Many containers are running successfully but I am unable to add more; I am trying to deploy a new docker container and getting the following error: container ...
user avatar
  • 7,670
0 votes
1 answer
421 views

lxd init: bind: address already in use

I have problem with bind problem with lxd init. The port 8443 is not used by any other application, therefore I think, lxd init tries to bind this port twice. My lxd version is 3.14 and I am using ...
user avatar
1 vote
1 answer
34 views

How to bufferize a PTS?

I'm building a system using LXC containers trough libvirt, and I'm trying to record/forward the container's stdout. When creating a new domain, a pseudo-TTY is created in /dev/pts/* and I'm able to ...
user avatar
  • 111
1 vote
2 answers
616 views

LXC container will start at the command line, but not automatically, from cron's @reboot or from /etc/rc.init

I can always start my container successfully with: fadedbee@host:~$ sudo lxc-start -n mycontainer It used to start automatically, until I bound some directories on a local ZFS to it. I added the ...
user avatar
  • 579
0 votes
1 answer
26 views

Linux containers [closed]

Linux containers 1- are containers really safe ? (I know that there was some vulnerabilities around like the one found in runc ... but are they really safe in general, since they use syscalls and an ...
user avatar
  • 1
1 vote
0 answers
61 views

How to run snap daemon outside a container

It looks like snap programs (installed on ubuntu) are run instide VMs/containers created by Canonical (called multipass). But what if my daemon needs access to the host filesystem, host system socket ...
user avatar
2 votes
1 answer
386 views

Custom message to "This account is currently not available" when user login is disabled

I have a Lxc container inside a Proxmox host. I need to prevent that the Proxmox admin can login inside my container. To do so I disabled root login in /etc/passwd. When the Proxmox admin uses pct ...
user avatar
  • 23
0 votes
1 answer
393 views

debootstrap Couldn't find these debs: lxc

I'm trying to follow along to a guide to creating an unprivileged lxc container on Ubuntu. According to the instructions, I should run: debootstrap --include=lxc eoan rootfs But when I run that, I ...
user avatar
2 votes
2 answers
678 views

Recover deleted but mounted loop file/filesystem

By mistake, I deleted an lxc image file. The container is still running and the file is therefore not yet actually deleted until I stop the container. I'd like to avoid stopping the container as it is ...
user avatar
2 votes
1 answer
2k views

How to run lxc exec for commands with pipe?

for example, I have this command: lxc launch ubuntu:18.04 memsql1 lxc exec memsql1 -- wget -O - 'https://release.memsql.com/release-aug2018.gpg' 2>/dev/null | sudo apt-key add - && apt-...
user avatar
  • 7,951
0 votes
0 answers
107 views

What is the easiest way to transparently compress directories on ext4 in lxd container (btrfs mounted)?

What is the easiest way to compress directories transparently on lxd container server with ext4 file-system when the lxd/lxc is mounted on btrfs file system with btrfs RAID1? The container has tons ...
user avatar
1 vote
1 answer
587 views

LXC Container with Overlayfs/Squashfs

We are using a Centos LXC container with the rootfs contained in a squashfs filesystem. I really like the fact that a user cannot edit the rootfs from the host. During the development, developers ...
user avatar
  • 121
1 vote
0 answers
93 views

Custom images for LXC deployment

With docker you can build a custom image by starting with a base OS image from the community such as Ubuntu, or Alpine, then install your app and any other dependencies (ngnix for example). Then ...
user avatar
  • 111
1 vote
2 answers
207 views

How to create VM's for 32-bit and 64-bit Wine-based development environments on a 64-bit box? [closed]

I am running a 64-bit Linux (Devuan) and want to create separate VM's to contain Wine as 64-bit and 32-bit respectively, as well as the needed development(coding/IDE/debug) tools for each. My options:...
user avatar
  • 511
-1 votes
1 answer
436 views

Need help installing Modoboa Mail Server

this is my first job as IT. I don't have much knowledge about Servers, but I'm trying to learn really hard. Having said that, please, I really need help trying to deploy a mail server. I have this ...
user avatar
3 votes
1 answer
1k views

lxc(-net ?) problems when starting container on debian Buster

I've (tried to) set things up to allow myself to have some unprivileged containers I can start (and then use) as needed. Now I can create new containers with lxc-create, but when I try to start one, ...
user avatar
0 votes
0 answers
262 views

lxc-stop says container-name not running, when it is running

I've created a container using lxc launch ubuntu:16.04. My host machine is ubuntu 16.04 as well. The container is running: But when I run lxc-stop like this: » lxc-stop ideal-bluejay I get the ...
user avatar
0 votes
2 answers
3k views

How to run docker inside an lxc container?

I have unprivileged lxc container on Arch host created like this: lxc-create -n test_arch11 -t download -- --dist archlinux --release current --arch amd64 And it doesn't run docker. What I did ...
user avatar
  • 101
0 votes
3 answers
154 views

Why am I not seeing as many page faults as I expect?

I am trying to explore the page fault behavior of Linux. I made an lxc container with restricting the memory to 1GB (by adding 'lxc.cgroup.memory.limit_in_bytes = 1G' to /etc/lxc/default.conf). Then, ...
user avatar
  • 111

1
2 3 4 5
7