Successfully able to run FreeBSD on WSL2! ๐ This is an experimental personal project with zero changes to the #FreeBSD base system. I had to make some changes to WSL2 (Open Source) to make it work. @freebsd @freebsdfndation @FreeBSDHelp #EuroBSDCon A thread on how I did it ๐งต
Firstly, this is not a sponsored project โ purely personal curiosity and a PoC. Not Production grade What works? โ #FreeBSD console works with most commands. โ Networking and 9P filesystem mounts are not enabled yet. Next steps: networking, then host fs mount. #FreeBSDonWSL2
Iโve been wishing for #FreeBSD on #WSL2. Once it became Open Source, spent my weekends experimenting. Found out WSL2 uses the HCS API, not Hyper-V. My first small C program confirmed FreeBSD could run inside HCS. That was a big go-ahead signal for me https://x.com/balajesankar/sta...
Couldnt setup HCN networking though. Generated the HCS Json from within Wslservice and tested it with #FreeBSD. Virtio Console was not working. So setup serial console. Then tested if FreeBSD works with hvsock - both server and client. It worked!!
Once I got the individual pieces working, I did the experimental changes to the WSL2 OSS. My approach is different from Linux's I used a full #FreeBSD VHDX instead of the kernel+init+userland method. I also wrote 2 programs, hvinit & hvbridge, to handle all the hvsock handshakes
I've pushed the WSL2 OSS related changes to GitHub. Will share the #FreeBSD side code soon. Thanks to all the brilliant minds who built both FreeBSD and WSL2 for making this possible. https://github.com/BalajeS/WSL... #FreeBSD #WSL2 #Windows #OpenSource #Tech #EuroBSDCon
Apologize code is as-is pushed with my changes. Requires clean up of everything including ReadMe.
@balajesankar @freebsd @freebsdfndation @FreeBSDHelp Nice work, gonna add that to next Valuable News :) You should change http://README.md to contain FreeBSD and not Linux information as its kinda confusing for some :)
@vermaden @freebsd @freebsdfndation @FreeBSDHelp Sure. I will do that soon.
@balajesankar @freebsd @freebsdfndation @FreeBSDHelp Amazing work!
@apparentorder @freebsd @freebsdfndation @FreeBSDHelp Thanks !!
@balajesankar @freebsd @freebsdfndation @FreeBSDHelp Congratulations! You summoned the beastie daemon and trapped it inside a Windows environment.. :)

