Questions tagged [lxd]
66 questions
6
votes
2 answers
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 top-level non-virtual system, but it refuses SSH…
Łukasz Zaroda
- 127
4
votes
0 answers
How to enable hostname resolution (dns) for lxd containers from the lxd host?
How to enable lxd hostname resolution from the lxd host?
After creating the below container:
>>> lxc launch ubuntu: container
Creating container
Starting container
>>> lxc…
Greg
- 1,745
4
votes
2 answers
lxd container: port forwarding like docker
Is there a way to do port-forwarding in lxd-containers like docker does?
I heard some rumours that there is no easy way.
According to the homepage of lxd this is their goal:
Intuitive (simple, clear API and crisp command line experience)
For me…
guettli
- 3,811
4
votes
0 answers
Why su command takes to long in nested Debian LXD containers?
I observed that the command su takes too long (30 seconds) when it is executed in a LXD Debian container that is nested into an Ubuntu LXD container. This overhead does not occur Debian containers that are not nested, nor in Ubuntu containers…
Daniel Hernández
- 303
- 1
- 2
- 5
3
votes
0 answers
How to mount specific /proc for all Docker containers on a host?
I am running Docker containers within an LXD container and I have noticed that Docker mounts it's own copy of /proc despite the LXD container having container-aware /proc files.
For example:
root@lxdcontainer:~# grep -c processor /proc/cpuinfo…
3
votes
3 answers
How to shrink btrfs image file used by LXD storage?
I have btrfs image file set as backend for LXD (2.18) but I would like to shrink it's size. What I did:
mounted image to loop device losetup /dev/loop1 /home/btrfs.img
mounted device to /mnt dir mount /dev/loop1 /mnt/brtfs
resized btrfs partition…
Kaburabu
- 31
2
votes
1 answer
Is lxd/lxc a suitable replacement to virtual machines (vSphere, for example) for server infrastructure?
I would like to move my servers to virtual machines. This is because it'll make it easier for me to fire up more machines and back them up in case the physical server is damaged (I'm not aware of other benefits). While I use virtual machines…
2
votes
3 answers
How to resize lxc/lxd images, if i am using LVM backend?
I'm using LXD few years and I'm glad to use this platform in my testing environment. But few days ago, I couldn't install Microsoft SQL server 2017. The reason was, that I used default ZFS backend.
Ok, I checked, that if I need ext4. I have to use…
Piduna
- 591
2
votes
2 answers
Move LXD container to other storage
I have an issue with my current storage.img file (btrfs). I had 2TB data inside a container and so the storage.img got 2TB large. After this I deleted everything, leaving me with 100GB of real data. The problem is now, that the storage.img did not…
Amon Bune
- 63
2
votes
0 answers
LXD external static ip
I'm using LXD for managing LXC containers. I used the "standard" bridged NAT setup up to now. But know I got an additional static ip which is external available. I want to attach it to my container but cant get it working within the LXD network…
Aaryaman
- 43
2
votes
1 answer
Debian 12 + LXD/LXC security.idmap.isolated fails
Debian 12.1 (6.1.0-11-amd64) running LXD/LXC and on an unprivileged container setting security.idmap.isolated=true seems to fail to update the owner/group of the container's files.
Here is an example:
# lxc launch images:debian/12 debian
(...)
#…
TCB13
- 1,378
2
votes
2 answers
Running tasks inside LXD container through ansible
Trying to figure out the best way to get ansible to do its magic within the containers. Was thinking of using ssh in each container, but then that is server-dependent. or I have to come via the proxy which seems like more work than should be…
gzala
- 31
- 3
2
votes
0 answers
How to move a linux container to a remote server running proxmox 7.0?
I am currently in the process of migrating a server running several linux containers to a server managed by proxmox. In the past when i moved a linux container to a different host i just used the LXD API, simplestreams protocol and executed a lxc…
harald
- 403
2
votes
3 answers
How do I download and install a regular DPKG package in a cloud-init script?
I'm spinning up lightweight containers on a Linux Host using LXD/LXC.
The sole purpose of these containers is to host "Dotnet & Dotnet core apps"
For a while I've been using Ansible, but recently I found that I could actually embed an init script…
shawty
- 343
2
votes
1 answer
How do I refer to the 'LXD host from an LXD container
We currently run our services in a series of LXD containers - we have one running a nginx server as a reverse proxy, pointing at each service, and where I need to connect to a container from the host or another container, I use the LXD assigned…
Journeyman Geek
- 7,036