WSL2 and Proxmox 8 issue

pgro

Member
Oct 20, 2022
63
2
13
Dear Members,

I was able to install Proxmox 8 via WSL2 and Genie, (My Kudos to https://github.com/gaudat/gauup/blob/master/homelab/pve-wsl2.md)

I was able to login to Proxmox GUI and the rest but for some reason I cannot use iscsi module. Here what I get.

Code:
root@Pacman-wsl:/lib/modules# pveversion -v
proxmox-ve: 8.0.2 (running kernel: 5.15.90.1-microsoft-standard-WSL2)
pve-manager: 8.0.4 (running version: 8.0.4/d258a813cfa6b390)
pve-kernel-6.2: 8.0.5
proxmox-kernel-helper: 8.0.3
proxmox-kernel-6.2.16-15-pve: 6.2.16-15
proxmox-kernel-6.2: 6.2.16-15
ceph-fuse: 16.2.11+ds-2
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown: residual config
ifupdown2: 3.2.0-1+pmx5
libjs-extjs: 7.0.0-4
libknet1: 1.26-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.5
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.9
libpve-guest-common-perl: 5.0.5
libpve-http-server-perl: 5.0.4
libpve-rs-perl: 0.8.5
libpve-storage-perl: 8.0.2
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.3-1
proxmox-backup-file-restore: 3.0.3-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.9
pve-cluster: 8.0.4
pve-container: 5.0.4
pve-docs: 8.0.5
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: 3.8-2
pve-ha-manager: 4.0.2
pve-i18n: 3.0.7
pve-qemu-kvm: 8.0.2-6
pve-xtermjs: 4.16.0-3
qemu-server: 8.0.7
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0

Code:
root@Pacman-wsl:/lib/modules# /usr/bin/iscsiadm --mode discovery --type sendtargets --portal 192.168.1.250:3260
iscsiadm: read error (-1/104), daemon died?
iscsiadm: Could not scan /sys/class/iscsi_transport.
libkmod: ERROR ../libkmod/libkmod-module.c:895 kmod_module_insert_module: could not find module by name='iscsi_tcp'
iscsiadm: Could not insert module tcp. Kmod error -2
iscsiadm: iSCSI driver tcp is not loaded. Load the module then retry the command.
iscsiadm: Could not perform SendTargets discovery: iSCSI driver not found. Please make sure it is loaded, and retry the operation

Code:
root@Pacman-wsl:/lib/modules# modprobe -v libiscsi
modprobe: FATAL: Module libiscsi not found in directory /lib/modules/5.15.90.1-microsoft-standard-WSL2

Any idea where I can find the iscsi module? Do I need to compile the kernel ?

Update: It seems that indeed I need to re-compile the kernel. I found this post https://www.starwindsoftware.com/blog/enable-block-storage-devices-in-wsl2 so I will try this one first and I will revert.
 
Last edited:
Hi pgro,

I'm currently in the middle of compiling the kernel for WSL2 as well. The first go around using Gaudat's method had extremely poor performance, and I ran into the libraries issues the other day and also embarked on compiling a few different kernels for testing. Hoping to stay in touch with you here to see how you're doing and compare notes.

I hadn't played around with WSL before as I abandoned Windows entirely for Linux and Mac a couple years ago, but I'm back now for some dilly-dallying. A couple things to note:

1) Genie -- Should no longer be needed
Enable systemd in wsl.conf or .wslconfig

2) Nested Virtualization -- Only available on Windows 11
I'm running Windows 10, and was unable to get KVM support nor host cpu type. I really don't want to upgrade to Windows 11, but looks like I'll have to. Are you on Windows 11 or 10, and do you notice a huge performance bump with KVM on/off?

My experience benchmarking a few machines in proxmox showed that without KVM on I was only at about 60% of comparable (single core score). Those were 8th and 9th gen processors. I'm running 12th and 13th gen now and haven't re-tested the difference, but guessing it holds true.

3) Exclude virus scanning rootfs - for much better performance
Exclude WSL rootfs from Windows Defender

4) Networking - Enable host loopback
I haven't been able to test this yet, but should be able to get networking to local host without extra effort. Currently only available in Windows Insider releases though.

[experimental]
hostAddressLoopback=true



I'll be upgrading to Windows 11 :( and installing the Insider release to compare performance. I can't install proxmox on the bare metal on this machine yet as I'm waiting on some WSON8 adapters to be able to unlock the bios and disable secureboot. Have a chance to learn WSL config in the mean time I guess.
 
Hi pgro,

I'm currently in the middle of compiling the kernel for WSL2 as well. The first go around using Gaudat's method had extremely poor performance, and I ran into the libraries issues the other day and also embarked on compiling a few different kernels for testing. Hoping to stay in touch with you here to see how you're doing and compare notes.

I hadn't played around with WSL before as I abandoned Windows entirely for Linux and Mac a couple years ago, but I'm back now for some dilly-dallying. A couple things to note:

1) Genie -- Should no longer be needed
Enable systemd in wsl.conf or .wslconfig
Thnx I was too directed to that way with enable of systemd in was.conf and get rid all the genie part.
2) Nested Virtualization -- Only available on Windows 11
I'm running Windows 10, and was unable to get KVM support nor host cpu type. I really don't want to upgrade to Windows 11, but looks like I'll have to. Are you on Windows 11 or 10, and do you notice a huge performance bump with KVM on/off?
Windows 11 wasn't have any issue with nested. No, it was working juts perfect on my i7
My experience benchmarking a few machines in proxmox showed that without KVM on I was only at about 60% of comparable (single core score). Those were 8th and 9th gen processors. I'm running 12th and 13th gen now and haven't re-tested the difference, but guessing it holds true.

3) Exclude virus scanning rootfs - for much better performance
Exclude WSL rootfs from Windows Defender

4) Networking - Enable host loopback
I haven't been able to test this yet, but should be able to get networking to local host without extra effort. Currently only available in Windows Insider releases though.

[experimental]
hostAddressLoopback=true



I'll be upgrading to Windows 11 :( and installing the Insider release to compare performance. I can't install proxmox on the bare metal on this machine yet as I'm waiting on some WSON8 adapters to be able to unlock the bios and disable secureboot. Have a chance to learn WSL config in the mean time I guess.
 
I was trying to follow the same set of instructions but updated to running with windows 11:

WSL version: 2.0.15.0
Kernel version: 6.1.21.2-microsoft-standard-WSL2+
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22635.2915

However, some of my pve services are not starting:

systemctl list-units --type=service|grep pve
● pve-cluster.service loaded failed failed The Proxmox VE cluster filesystem
● pve-firewall.service loaded failed failed Proxmox VE firewall
● pve-ha-crm.service loaded failed failed PVE Cluster HA Resource Manager Daemon
● pve-ha-lrm.service loaded failed failed PVE Local HA Resource Manager Daemon
pve-lxc-syscalld.service loaded active running Proxmox VE LXC Syscall Daemon
pvedaemon.service loaded active running PVE API Daemon
pvefw-logger.service loaded active running Proxmox VE firewall logger

Anyone have any suggestions on best way to debug

pveversion -v
Code:
proxmox-ve: not correctly installed (running kernel: 6.1.21.2-microsoft-standard-WSL2+)
pve-manager: not correctly installed (running version: 8.1.3/b46aac3b42da5d15)
proxmox-kernel-helper: 8.1.0
proxmox-kernel-6.5: 6.5.11-7
proxmox-kernel-6.5.11-7-pve-signed: 6.5.11-7
ceph-fuse: 16.2.11+ds-2
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: not correctly installed
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.0
libproxmox-backup-qemu0: 1.4.1
libproxmox-rs-perl: 0.3.3
libpve-access-control: 8.0.7
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.1.0
libpve-guest-common-perl: 5.0.6
libpve-http-server-perl: 5.0.5
libpve-rs-perl: 0.8.7
libpve-storage-perl: 8.0.5
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve4
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.1.2-1
proxmox-backup-file-restore: 3.1.2-1
proxmox-kernel-helper: 8.1.0
proxmox-mail-forward: 0.2.2
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.1.3
pve-cluster: 8.0.5
pve-container: 5.0.8
pve-docs: 8.1.3
pve-edk2-firmware: not correctly installed
pve-firewall: 5.0.3
pve-firmware: 3.9-1
pve-ha-manager: 4.0.3
pve-i18n: 3.1.5
pve-qemu-kvm: 8.1.2-6
pve-xtermjs: 5.3.0-3
qemu-server: 8.0.10
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0



 
I got procmox to install and create a VM using a Photon OS 5.0 iso, it booted but the installation failed I need to figure out how to specify a SATA hard drive for the installation to complete and then how to specify a NIC.