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
0
votes
1 answer

How to start an LXC LXD container in Ubuntu

You are probably wondering how to install lxc/lxd in ubuntu to test your new code in a container. Then how to create an image. I will show you how you do it.
Koops
  • 422
  • 3
  • 11
0
votes
0 answers

Multiple levels of NGINX Reverse Proxy: one at router gateway level and another on each LXD Server Environment?

I've been using nginx as a reverse proxy in my home lab for quite a while. Lets Encrypt as well. All is well there. But now I am adding in the concept of LXD containers and I've hit a problem. If I have an LXD server, then I need a proxy to bridge…
HeneryH
  • 95
  • 1
  • 8
0
votes
0 answers

Stuck in a "Running machine configuration script"

Following this bash file We are facing issue that the time i add juju bootstrap maas-controller it goes in running machine configuration script and waiting more than 2 hrs. Resources added for juju-controller 4 core CPU 8Gb RAM 16Gb storage
0
votes
1 answer

Is there a way I can make LXD container capture packets while keeping parent interface available in host machine to capture packets from there too?

Hello StackOverflow community, I have a specific scenario I’m trying to implement, and I haven’t found any solution on this forum. I hope you guys may be able to help me. I currently have a Lubuntu 22.04 host with 2 Network Cards: First card (ens33)…
0
votes
0 answers

Keep system asynchronous using execSync node.js

There is a node.js application with the following request processing: app.get('/api/createMachine', async (req, res) => { let result = execSync('lxc create ubuntu: virtual7').toString() res.send('create') }) execSync in this case executes a…
L1M80 54N
  • 11
  • 3
0
votes
0 answers

Problem with node.js child_process exec for lxc/lxd launch/delete commands

I am using node.js to execute lxc/lxd commands on the server. Many commands for getting information about containers work as expected. For example: app.get('/checkVirtual', (req, res) => { exec('lxc list -c "n" --format="csv"', (error, stdout,…
L1M80 54N
  • 11
  • 3
0
votes
1 answer

Configure lxc to set the header x-forwarded-for

I have a server that host some lxc on it, and i forward what he get from port 8080 to the port 80 of my lxc lxc profile create proxy-8080 lxc profile list # first create a profile bound to the future local host lxc profile device add proxy-8080…
0
votes
0 answers

Deployment of mysql-operator fails with “unsupported mode prw”

I have a working microk8s but the deployment of mysql-operator installed according to the official documentation(using manifest files) is failing. My microk8s is installed on 3 lxd containers based on ubuntu 22.04 images. The host is a laptop…
goremo
  • 43
  • 7
0
votes
0 answers

Getting Error: Common start logic: device or resource busy after running lxc start

I have an lxd container, which when i run the command lxc start I get this message Error: Common start logic: device or resource busy Try lxc info --show-log for more info. I had freed up some space from its…
Mucheru
  • 83
  • 2
  • 4
0
votes
1 answer

LXD Import hangs after 100%

Am I using the command line wrong? me@HP-EliteDesk-20:~$ lxc project switch drupal lxc import my_dir/mariadb_2023_01_10.export mariadb Importing instance: 100% (1.19GB/s) <-- this just hangs
HeneryH
  • 95
  • 1
  • 8
0
votes
0 answers

Forwarding DNS to LXC container

Eventhough I configured in my NGINX Proxy-Server to redirect to a LXC container when connected to a certain domain this is not working. I am trying to connect to my website in a LXC container, I have pointed my domain towards it and in a additional…
0
votes
0 answers

Installing with apt succeeds but packages are not installed

I'm using Ansible to install Apt packages on a lxd Ubuntu20.04 container running an Ubuntu 20.04 host. The container is created successfully and commands execute in the container as expected. But using apt through Ansible does not. Ansible shows…
Barco
  • 11
  • 3
0
votes
0 answers

LXD - Cannot list network forwarded ports

I am trying to figure out how to list ports forwarded by LXD through lxc network forward. I have 2 NIC configured as : ip a result I configured network forward ports that way : lxc network commands My configuration works quite well and I can access…
0
votes
1 answer

How to determine what profiles are part of an LXD container or archive when copying or importing

I get the following error when trying to import an LXD container from a backup.tar.gz archive: $: sudo lxc import backup.tar.gz Error: Failed importing backup: Failed loading profiles for instance: Profile not found This error provides no…
dano_
  • 13
  • 3
0
votes
0 answers

How to build a Ubuntu Packer file for LXC/LXD in HCL?

I have done the tutorial and read the documentation for the LXC builder but I am still confused on how to tell Packer how to use what image. I can understand the tutorial for Docker but as soon as I change parts that should load Ubuntu and Init the…
Definity
  • 691
  • 2
  • 11
  • 31