If you just running LXC/LXD containers, the default settings for WSL2 (both Windows 10 and Windows 11) should be adequate.
However, if trying something like lxc launch images:alpine/3.18 --vm
, LXC will complain that
vhost_vsock
module is not loaded.
Here's how I configure WSL2 so I can run VM with LXC/LXD.