Has anyone tried to run LXD on the Windows 10 Windows Subsystem for Linux (WSL) bash?
LXD comes with the latest Ubuntu version (18.04) that windows loads up, but I cannot get the
LXD daemon to run. It is failing to start. I tried the following:
$ sudo systemctl enable lxd.service
…and get this:
Starting Container hypervisor based on LXC: lxd.
Error: LXD still not running after 600s timeout (Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory)
And sure enough, it’s not lying…no unix.socket file to be found anywhere!
So is the Win 10 WSL too crippled to work? You would think if they include the LXD/LXC software in their bionic build, it should work…right?
I would really like to see this work as I am working on a container based feature that would be great
on a Windows box.
I did post this to the Microsoft/WSL github issues…
for anyone interested, the reply was pretty clear: WSL is NOT some sort of new VM implementation, it’s a way to run Linux apps on Windows; no systemd = no LXD on Ubuntu WSL. That’s it. It’s not even clear if WSL supports cgroups. If not, it will not work on any distribution.
I certainly know what VM is.And I know what WSL is. I have been using vBox for years. But the thought of running LXD on a windows 10 WSL without installing other software is intriguing.
Why would MS include LXD in their bionic bash WSL if it don’t work?
see comment
if you are using Windows home, Multipass is out as well.
Your best bet is probably Virtual Box (or Vmware if they are still providing sutff for Windows)
LXD appears in the repositories (and probably in the container image for WSL) because it is the stock Ubuntu container image. It can get confusing if it appears there while it cannot work without a Linux kernel.
It would be possible for LXD to run natively on WSL if WSL provided all the necessary features that LXD requires from the Linux kernel.
But you have a limited number of VMs that your server can run. If you are content with very few VMs and have a high end server, then you are ok with a VM.
yes as said before, Windows Home can’t handle Multipass, so that’s an option now available , lucky you . Now I don’t know much Multipass and I can’t help you with it, but other can certainly do it.
With multipass you can create multiple Ubuntu VMs. In each of them you can install LXD.
Normally you would start with a single VM and a nice LXD installation.
Multipass in not a requirement; you can use any other VM tool as well. It is lightweight though, and it is the same tool on native Ubuntu.
Only Windows 10 Pro or Enterprise , build 1803 or later is currently supported.
Make sure the network you’re connected to is marked Private (which really means Trusted ), otherwise Windows will prevent Multipass from starting. We’re working on resolving that issue.
You will need to allow the installer to gain Administrator privileges.
I’m a bit confused, on the Github page, it states creation, management and maintenance of virtual machines. This seems far from containers ? Notwithstanding, the Github repository is vague about the underlying technology?
On Windows you cannot run LXD directly, so you need first a VM running Ubuntu or other Linux, then setup LXD in there.
So, you can either use HyperV with an Ubuntu image, multipass over HyperV, VMWare, Virtualbox or something else.
If HyperV is too much trouble (i.e. requires a version of Windows you do not have), then go for an alternative.