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

Using LXD REST API, ClientWebSocket throws 'AuthenticationException' on .Net Core, but on .Net Framework, it works well

I'm porting LXD.NET to .Net Standard 2.0. REST APIs via HTTPS works well with .Net Core and .Net Framework. But using WebSocket APIs (e.g. 1.0/containers//exec ), ClientWebSocket throws Authentication Exception on only .Net Core. ( On .Net…
Gnico
  • 1
  • 4
0
votes
1 answer

LXD local pylxd.Client connection sees no containers while "lxc list" command lists a dozen

On a ubuntu 16.04 machine with lxd 2.21, the following code returns all my containers: from pylxd import Client client = Client() client.containers.all() On a ubuntu 18.04 machine with lxd 3.0.1, the same code returns an empty list On both…
Max L.
  • 9,774
  • 15
  • 56
  • 86
0
votes
1 answer

Retrieving Container IP address after `lxc start`

I have the following script I'm running in cloud-init on my cloud provider. It grabs a container from another host on my network, starts it, and then attempts to forward a port on the host to the container: lxc init ... lxc remote add gateway…
ThaDon
  • 7,826
  • 9
  • 52
  • 84
0
votes
0 answers

How can I create a custom sized disk using LXC

Good day, I have been looking through a lot of documentation and nothing really appears to confirm how to expand the disk size of the the LXC containers that I am spinning up.. Here is what I have tried so far, I warn you the items below look…
LUser
  • 1,127
  • 4
  • 23
  • 39
0
votes
3 answers

apache - how to redirect to another server

I have the following problem: I have my HomeServer on IP 192.168.0.1, it's an exposed host, getting every access from outside. On this Server I have running some lxc containerts, two of them have apache2, etc on it. Now I want to access every server…
Fachinformatiker
  • 160
  • 1
  • 17
0
votes
1 answer

LXC - Can't access package manager from linux container

I have LXD installed on a fedora 27 machine. I configured it a while ago, and it has worked fine long enough that I forgot how I set everything up. I just tried to create a new container and it creates successfully, but I can't get it to access the…
Yurelle
  • 348
  • 2
  • 13
0
votes
1 answer

LXD Container in ERROR State

I have a Ubuntu 16.04 LTS system where i created 3 LXD containers. They where working fine. The system was reseted without stopping the containers by accident. Now they are in a ERROR state and I cannot start them. When i try to start any of them i…
nacho
  • 5,280
  • 2
  • 25
  • 34
0
votes
1 answer

HAProxy and LXD Containers - Route based on naked domain, specific sub-domain and all other sub-domains

I have tried searching for a similar solution to the problem I am having, but could not find anything. I have setup some LXD containers, one is HAProxy which is recieving port 80 traffic from the host's public IP address. HAProxy thens sends the…
0
votes
0 answers

Move an LXC Container from one host to another through an API

I'm new to LXC containers and i'm aware of how to move a container from one host to another using the cli move code, but how would it be possible to do this using the pylxd api or any other apis, i need to be able to do this for my upcoming project,…
Jonathan Kumar
  • 553
  • 1
  • 6
  • 20
0
votes
1 answer

Running Xvfb in LXD container

It is easy to run GUI application inside LXD container (ubuntu:16.04) with Xvfb and executing the bellow commands inside the container: Xvfb -ac :99 -screen 0 1600x900x24 & export DISPLAY=:99 firefox & My objective is to execute above commands…
0
votes
1 answer

Exposing kubernetes service locally (without minikube)

I'm using lxc/lxd to play with the kubenetes cluster. Is there a way to expose a deployed service locally without using minikube, so that I could access it from the local machine? I can access it from any of the nodes in the cluster but not from…
rweye
  • 83
  • 1
  • 6
0
votes
1 answer

How to create a volume in a ZFS dataset and attach to a LXD container?

I'd like to create a volume in a zfs dataset: sudo zfs create mypool/maildir sudo lxc storage volume create mypool/maldir custom1 and got error: not found my create is sure to be wrong, what I intended to do is: create a zfs dataset use the…
AngeloC
  • 3,213
  • 10
  • 31
  • 51
0
votes
1 answer

Multiple LXD containers on single macvlan interface

I'm a little confused as to how the following scenario works. It's a very simple setup, so I hope the explanation is simple. I have a host with a single physical NIC. I create a single macvlan sub-interface in bridge mode off this physical NIC. Then…
Andi Jay
  • 5,882
  • 13
  • 51
  • 61
0
votes
1 answer

saltstack lxd-formula howto

I want to install with salt lxd containers, and I got only errors. I'm beginner with salt. I've cloned lxd-formula from GitHub, and I put folders under /srv/salt: /srv/salt/lxd /srv/salt/_modules /srv/salt/_states and I modify file_roots like…
Akos
  • 3
  • 2
0
votes
1 answer

Is it possible to dump an LXD container to a tgz archive?

I wonder if it's possible to dump a whole container to a tgz archive, so it can be bakuped or moved to another server. I know I can do it with an image, so I can pusblih the container as an image and dump it but would be nice to be able to do it…
Monkiki
  • 109
  • 2
  • 10