
LXD 2.14 has been released - rbanffy
https://discuss.linuxcontainers.org/t/lxd-2-14-has-been-released/157
======
jitl
Can anyone give an overview of what LXD offers, and compare the experience of
working with LXD to Docker? I've tinkered with BSD jails, Docker, and KVM, and
I'm curious about LXD.

~~~
lathiat
The simplest explanation I like, is that these give you "machine containers"
as opposed to docker "process containers". It's designed to deploy a full
image, running Ubuntu (well, any linux distro) system with it's own init
system, ssh, etc. In many ways it feels much like a Virtual Machine, though
you do have some restrictions you don't in a VM (mostly with regards to use of
in kernel services, such as mounting filesystems or using in kernel stuff like
the iscsi target).

For most purposes and running most applications, you can create an LXD and
login to it and it feels just like a VM but with no VM overhead and you can
see all the processes inside container from outside the container ("on the
host"), e.g. in top.

~~~
psandersen
Can you pass through a graphics card in anyway or would it need to be
installed on the host? I'm thinking about making my main workstation a proxmox
host, with the desktop environment a container.

~~~
angry_octet
There is still only one kernel, the host if you will. Since graphics drivers
are kernel mode, it has to be loaded into the kernel. So VM style pass-through
of PCI devices doesn't really make sense.

However, GPUs are increasingly supporting virtualisation and multiprocessing.
For example, nVidia supports multiplexing a single GPU across multiple VMs for
VMWare View. I'm not sure if there is special driver paravirtualisation magic
happening but I suspect so. But there is at least some GPU process control and
resource scheduling now, and I expect this technique will be accessible to
linux in the near future.

At present you can map through the host devices created by kernel drivers into
the container, and then access them via userland libraries. You are still
dependent on the library versions and the driver version matching. This works
for CUDA and OpenGL. [https://blog.simos.info/how-to-run-graphics-accelerated-
gui-...](https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-
lxd-containers-on-your-ubuntu-desktop/)

~~~
angry_octet
Relevant talk from GTC 2017. Note that a special GRID driver is required, and
it must match the driver on the host (VMWare Horizon). [http://on-
demand.gputechconf.com/gtc/2017/presentation/s7349...](http://on-
demand.gputechconf.com/gtc/2017/presentation/s7349-tony-foster-getting-
started.pdf)

Also, the nVidia GRID licensing makes me vomit in my mouth.

------
slitaz
If you click the link, there is a demo service to try out LXD through your
browser. It creates a shell and has a tutorial to follow with this new shell.

------
jalopy
Does anyone know how "lightweight" LXD is compared to Docker in terms of
memory and disk footprint required for each type of container?

~~~
mazamats
I've tried Alpine Linux on both docker and LXD. Memory usage is the same,
however startup time is much better on LXD.

If you Google it, they have a benchmark that shows hundreds of containers
being launched on Docker and LXD as a benchmark.

------
BrandoElFollito
I was a heavy user of lxd and ended up switching to systemd-nspawn and never
looked back. It was much more intuitive tp me, files were easy to access etc.
Networking in particular is much easier (for me at least)

