Failed Getting LXD Working Under WSL2 Under Ubuntu 20.04 systemd & snap

by Mike Levin

Tuesday, June 14, 2022

Trying to get LXD working under WSL2

The prize is big;
On turf I’m first.
To crack this nut
I have a thirst.
The itch I scratch
Make no mistake’s
The bug you catch:
Windows ESCAPE!

—Mike Levin, 2022

First Attempt Failed Despite Heroic Rabbit-Chasing Efforts

Play pied piper showing the way to fullscreen Linux Terminal goodness.

Ugh! The last livestream attempting to

sudo lxd init

Failed on 2 fronts:

  1. It did not present zfs as an option
  2. The it did not result in anything listed when trying:

    sudo lxd list

There were error messages and it seemed network-related, so I have 2 things I’m going to try:

More information on making zfs available as an option: https://stanislas.blog/2018/02/lxc-zfs-pool-lxd/

It suggests that you first install the kernel headers to allow us to compile and install kernel modules:

apt install linux-headers-$(uname -r)

It them suggests we install ZFS AND DKMS modules (old instructions didn’t have DKMS):

apt install zfs-dkms zfsutils-linux

Next is says we need to load the module:

modprobe zfs

And it also says that after every restart it needs to be reloaded, which we can do with this:

echo "zfs" >> /etc/modules

Category: Linux Playgrounds (WSL & LXD)