Questions tagged [lxd]

LXD is a container "hypervisor" and a new user experience for LXC (Linux Containers).

LXD is a container "hypervisor" and a new user experience for LXC.

Specifically, it's made of three components:

  • A system-wide daemon (lxd)
  • A command line client (lxc)
  • An OpenStack Nova plugin (nova-compute-lxd)
  • The daemon exports a REST API both locally and if enabled, over the network.

The command line tool is designed to be a very simple, yet very powerful tool to manage all your containers. It can handle connect to multiple container hosts and easily give you an overview of all the containers on your network, let you create some more where you want them and even move them around while they're running.

The OpenStack plugin then allows you to use your lxd hosts as compute nodes, running workloads on containers rather than virtual machines.

The LXD project was founded and is currently led by Canonical Ltd and Ubuntu with contributions from a range of other companies and individual contributors.

Features

Some of the biggest features of LXD are:

  • Secure by design (unprivileged containers, resource restrictions and much more)
  • Scalable (from containers on your laptop to thousand of compute nodes)
  • Intuitive (simple, clear API and crisp command line experience)
  • Image based (no more distribution templates, only good, trusted images)
  • Live migration

Relationship with LXC

LXD isn't a rewrite of LXC, in fact it's building on top of LXC to provide a new, better user experience. Under the scene, LXD uses LXC through liblxc and its Go binding to create and manage the containers.

It's basically an alternative to LXC's tools and distribution template system with the added features that come from being controllable over the network.

156 questions
2
votes
0 answers

Rapid virtualization with "fork from here" to a new LXC/docker container

Looking at LXC and docker, they both require some kind of template or image to run a container. Is there a technology that allows to just fork current session into parallel world and commit or discard all the changes at the end? For example: $ echo…
anatoly techtonik
  • 19,847
  • 9
  • 124
  • 140
1
vote
1 answer

How to resize an ubuntu LXC LXD container

Are you exploring the world of Docker and coding on your Ubuntu desktop? It's common to feel a bit hesitant about making changes, but don't worry, I've got you covered! If you've encountered space issues while experimenting with Docker, I'll walk…
Koops
  • 422
  • 3
  • 11
1
vote
1 answer

Is is normal to have lxd process when running gitlab in a docker container?

I run a self hosted gitlab-ce:15.2.2-ce.0 inside a Docker container on my linux server, but I notice that the memory usage is very high. All is caused by this user called lxd. I thought lxd is another kind of container, not related to Docker at all.…
Thịnh Hà
  • 127
  • 1
  • 8
1
vote
0 answers

LXC network forward ports (yaml)

I got to my container (target_address) connected using nc -v 5.35.6.44 1234 from the outside world using one of my spare ip addresses (the listen_address) description: "" config: target_address: 10.103.26.196 ports: [] listen_address:…
Ben Muircroft
  • 2,936
  • 8
  • 39
  • 66
1
vote
0 answers

How to setup tailscale as a transparent l2 switch

I have two machines, vm1, vm2, with tailscale installed on both. each machine is running lxd with containers. each machine has its own private subnet, 10.55.1.0/24 and 10.55.5.0/24 respectively. Tailscale is setup to advertise routes, so that…
Ephemeral
  • 31
  • 3
1
vote
0 answers

Apparmor Blocking Network Access to Docker Containers on Debian

I am running Docker inside an unprivileged LXD Debian container. Docker is working well, except that the networking is not working within Docker. I can't access my Docker containers using my server's public IP. After intensive googling and testing…
1
vote
1 answer

Trouble adding LXD Clusters to MAAS

Trouble with Setting Up LXD Clusters in MAAS Hello! I have been working with maas to try and setup a LXD cluster. Setup Maas Controller: Dell Optiplex (nothing special, just an extra computer that I had around.) The MAAS controller is setup as the…
1
vote
2 answers

How to configure LXD container devices using saltstack "lxd_container.present" function?

I have the following working Salt state file which: 1) downloads an image 2) creates a container from that image and 3) adds a nic afterwards. These states work using the following setup: salt-ssh: version 3004 Python: 3.9.7 LXC (snapd): version…
dano_
  • 13
  • 3
1
vote
1 answer

runcmd in LXC profile ignored

I want to run a command for each container that is created using my profile. The profile looks like this: config: user.user-data: | #cloud-config package_upgrade: true packages: - python3 runcmd: - "touch…
foki
  • 8,624
  • 6
  • 33
  • 32
1
vote
0 answers

How to add USB device to LXC container using PyLxd

Goal: Dynamically add USB devices to running LXC instances using PyLxd library. Essentially, I want to pair an LXC container to a particular USB controller and whenever a device is added or removed from that controller, my script needs to update the…
DCaruso
  • 48
  • 6
1
vote
1 answer

How to view live file system of Multipass VM using LXD driver externally?

I am using Canonical's Multipass on a Raspberry Pi with LXD driver to start virtual machines (VMs). Given my configuration, I need to view real-time changes/updates happening in the virtual machine on the host, i.e. externally from the virtual…
1
vote
1 answer

LXC using separate HDD/VOLUME

Is there some method how can I define the major device (hdd, volume, ..) for LXC container? I have separated disks for each service/project which I want run inside LXC container. But I couldn't find the way how can I specify storage for all files in…
Petr Klein
  • 797
  • 2
  • 9
  • 23
1
vote
0 answers

How do I reliably run the Android emulator in an LXD container?

summary I am trying to run the Android emulator that is included with Android Studio in an LXD container (for reproducibility, security, separation). The emulator runs, but freezes up regularly, and when it freezes, I am not able to stop the LXD…
bitinerant
  • 1,168
  • 7
  • 24
1
vote
0 answers

LXD container: What does apparmor mount error -13 mean?

I have PiHole inside LXD container (on Ubuntu Server). It works very well, but I can see plenty of such errors in server's dmesg: audit: type=1400 audit(1613833741.169:605): apparmor="DENIED" operation="mount" info="failed flags match" error=-13…
micha
  • 39
  • 3
1
vote
1 answer

LXD vs classic VMs in production Cluster (Kubernetes)

I'm setting up a bare-metal hypervisor with VMware ESXi on a local server which will have a kubernetes cluster. Should I use Linux containers with LXD to set up my Kubernetes cluster? or should I use several VMs that I can provide with my VMware…
Zahid
  • 91
  • 1
  • 10
1 2
3
10 11