-
Notifications
You must be signed in to change notification settings - Fork 0
How to Install MacOSX on Windows 11 WSL2 as Docker
wsl.exe –install
[doc] https://docs.microsoft.com/en-us/windows/wsl/install
- C:/Users/<Your_user>/.wslconfig
[wsl2]
nestedVirtualization=true
https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe
- sudo apt update && sudo apt upgrade
- sudo apt install x11-apps -y
- sudo apt install cpu-checker
- kvm-ok
- sudo su
- big-sur MacOSX:
docker run -i --device /dev/kvm -p 5999:5999 -p 5998:5998 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" sickcodes/docker-osx:big-sur
- sudo su
- Monterey MacOSX:
docker run -it --device /dev/kvm -p 5999:5999 \ -p 5998:5998 \ -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" -e EXTRA="-display none -vnc 0.0.0.0:99,password=on" -e GENERATE_UNIQUE=true -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' sickcodes/docker-osx:Monterey
Sample docker imaging install process output:
- Type: change vnc password into the docker terminal and set a VNC password (must be repeated when restarting MacOSX docker image)
- Next follow: STEP 7
- (When you want to stop QEMU and stop Docker image type: q)
-
To start docker image: docker start -a -i `docker ps -q -l`
Download VNC Viewer for Windows | VNC® Connect (realvnc.com)
- Start VNC Viewer and connect to localhost:5999 (Docker MACOSX)
-
Type in VNC password that you have set in step 6
-
Wait until installation screen appears this may happen after several automatic reboots
- Select Disk Utility to erase QEMU Hardisk Media (Virtualized: First Disk)
- After HDD has been erased, **exit ** disk utility and Install MacOSX
- Install MacOSX Big-Sur on the erased HDD (can take up-to 2-3 hours)
Finally, MacOS (Monterey) is running