Even with binfmt installed, inside a WSL container, systemd-detect-virt -c did the trick.
$ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
qemu-user-static
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 14.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/paelzer/bug-1840956-binfmt-containers/ubuntu eoan/main amd64 qemu-user-static amd64 1:4.0+dfsg-0ubuntu8~ppa2 [14.2 MB]
Fetched 14.2 MB in 50s (285 kB/s)
(Reading database ... 91374 files and directories currently installed.)
Preparing to unpack .../qemu-user-static_1%3a4.0+dfsg-0ubuntu8~ppa2_amd64.deb ...
Unpacking qemu-user-static (1:4.0+dfsg-0ubuntu8~ppa2) over (1:4.0+dfsg-0ubuntu7) ...
Setting up qemu-user-static (1:4.0+dfsg-0ubuntu8~ppa2) ...
Processing triggers for man-db (2.8.7-3) ...
Alright,
Even with binfmt installed, inside a WSL container, systemd-detect-virt -c did the trick.
$ apt-get upgrade ppa.launchpad. net/paelzer/ bug-1840956- binfmt- containers/ ubuntu eoan/main amd64 qemu-user-static amd64 1:4.0+dfsg- 0ubuntu8~ ppa2 [14.2 MB]
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
qemu-user-static
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 14.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://
Fetched 14.2 MB in 50s (285 kB/s)
(Reading database ... 91374 files and directories currently installed.) user-static_ 1%3a4.0+ dfsg-0ubuntu8~ ppa2_amd64. deb ... dfsg-0ubuntu8~ ppa2) over (1:4.0+ dfsg-0ubuntu7) ... dfsg-0ubuntu8~ ppa2) ...
Preparing to unpack .../qemu-
Unpacking qemu-user-static (1:4.0+
Setting up qemu-user-static (1:4.0+
Processing triggers for man-db (2.8.7-3) ...