-
Modern Linux distribution (e.g., Ubuntu 22.04 LTS or later)
-
CPU with Intel VT-x / AMD SVM support
-
Install necessary packages:
sudo apt-get install qemu uml-utilities virt-manager git wget libguestfs-tools \ p7zip-full make dmg2img tesseract-ocr tesseract-ocr-eng genisoimage vim net-tools screen -y
-
Clone the repository to get the necessary scripts and files:
git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git cd OSX-KVM
-
Use the script to download the macOS Sonoma installer:
./fetch-macOS-v2.py
-
Convert the downloaded BaseSystem.dmg to an ISO:
dmg2img -i BaseSystem.dmg -o BaseSystem.iso
-
Configure the virtual machine using QEMU:
qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4,sockets=1,cores=2,threads=2 \ -machine q35,accel=kvm -usb -device usb-kbd -device usb-tablet \ -drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \ -drive if=pflash,format=raw,file=OVMF_VARS.fd \ -drive format=raw,file=BaseSystem.img -netdev user,id=net0 \ -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \ -device ide-drive,bus=ide.2,drive=Clover \ -drive id=Clover,if=none,snapshot=on,format=qcow2,file=./'Clover.qcow2' \ -device ide-drive,bus=ide.1,drive=MacHDD \ -drive id=MacHDD,if=none,file=./'MacHDD.qcow2',format=qcow2 \ -monitor stdio
-
Follow the on-screen instructions to install macOS Sonoma.
-
After installation, configure your VM settings as needed.
-
Install additional tools and drivers for better integration and performance.
-
Configure networking and other peripherals as necessary.
-
For detailed instructions and troubleshooting, visit the OSX-KVM GitHub page.
-
This guide assumes a working knowledge of Linux and command-line interface. .
sonoma very slow