I'm not entirely sure how WSL2 binfmt_misc works there, as we currently have a /proc/sys/fs/binfmt_misc/WSLInterop right now in WSL1, and WSL2 uses a Microsoft provided kernel, and there is a feature for you to run Microsoft .exe binaries from WSL2 and app opens in Windows (I have used it and it works :o).
My point is that it might recognize WSL2 as hyperv, but, still, fail to install qemu-user-static due to binfmt_misc issues. I currently have Windows 10 Pro Insider Preview 18970.rs_prerelease.190824-1711 to try if you want, but, I'm afraid of changes for WSL2 as it is still a tech preview. There is also a way to boot WSL2 with a custom (builtin) kernel, setting up a .wslconfig file in %HOME% directory... but, again, that would not be the default for the average user.
I reviewed PPA contents for Eoan:
https:/ /bugs.launchpad .net/ubuntu/ +source/ qemu/+bug/ 1840956/ comments/ 25 /bugs.launchpad .net/ubuntu/ +source/ qemu/+bug/ 1840956/ comments/ 26
https:/
And fix indeed works for WSL1.
Just a heads up on WSL2:
I'm not entirely sure how WSL2 binfmt_misc works there, as we currently have a /proc/sys/ fs/binfmt_ misc/WSLInterop right now in WSL1, and WSL2 uses a Microsoft provided kernel, and there is a feature for you to run Microsoft .exe binaries from WSL2 and app opens in Windows (I have used it and it works :o).
My point is that it might recognize WSL2 as hyperv, but, still, fail to install qemu-user-static due to binfmt_misc issues. I currently have Windows 10 Pro Insider Preview 18970.rs_ prerelease. 190824- 1711 to try if you want, but, I'm afraid of changes for WSL2 as it is still a tech preview. There is also a way to boot WSL2 with a custom (builtin) kernel, setting up a .wslconfig file in %HOME% directory... but, again, that would not be the default for the average user.