You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 15, 2024. It is now read-only.
Follow the script and you're done. Please mind that in my limited experience, there appears to be some disk I/O issue which slows the VirtualBox VM considerably, so booting macOS takes about ten minutes and installation takes many hours. If you're already compiling kernels and kernel modules, you might as well skip VirtualBox altogether and head directly to OSX-KVM on WSL2/WSLg which is a lot faster.
Here's a sort-of tutorial for compiling the
vboxdrvmodule for WSLg, adapted from the Darling guide and the Hanna J guide.No support is offered for installing WSLg, compiling a kernel, or compiling and loading the
vboxdrvmodule.This process can and will break, since WSLg is still in beta. Without further ado:
sudo apt updatesudo apt install build-essential flex bison libssl-dev libelf-dev git -y5.10.ykernel branch:git clone --depth 1 --single-branch --branch linux-msft-wsl-5.10.y 'https://github.com/microsoft/WSL2-Linux-Kernel.git' linux-msft-wsl-5.10.ycd linux-msft-wsl-5.10.ycp Microsoft/config-wsl .configsudo make -j $(expr $(nproc) - 1)sudo make modules_installsudo apt install virtualbox-sourcetar -xf /usr/src/virtualbox.tar.bz2cd modules/virtualbox/vboxdrvsudo make -C ~/linux-msft-wsl-5.10.y/ M=${PWD}sudo insmod vboxdrv.koHooray, now you can run the script, version
0.99.1.0or higher, and install macOS on VirtualBox on WSLg, super-slowly.sudo apt install bash coreutils gzip unzip wget xxd dmg2img virtualbox -ymkdir ~/macOScd ~/macOSwget https://raw.githubusercontent.com/myspaghetti/macos-guest-virtualbox/master/macos-guest-virtualbox.shbash -i macos-guest-virtualbox.shFollow the script and you're done. Please mind that in my limited experience, there appears to be some disk I/O issue which slows the VirtualBox VM considerably, so booting macOS takes about ten minutes and installation takes many hours. If you're already compiling kernels and kernel modules, you might as well skip VirtualBox altogether and head directly to OSX-KVM on WSL2/WSLg which is a lot faster.