A quick tutorial on how set up a simple macOS VM in QEMU, accelerated by KVM. Jump over the break to learn more…
WHAT IS KVM?
Kernel-based Virtual Machine (KVM) is a virtualization module in the Linux kernel that allows the kernel to function as a hypervisor.
KVM converts Linux into a type-1 (bare-metal) hypervisor and requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V.
- Qemu 3.1 or later
- KVM modules enabled
- A Mac computer is NOT required
1. Install dependencies. You might also want to install git (not shown in the screenshot ). Depending on your distro:
- For Ubuntu, Debian, Mint, and PopOS:
sudo apt-get install qemu-system qemu-utils python3 python3-pi
- For Arch and Arch based distros:
sudo pacman -S qemu python python-pip
- For Void:
sudo xbps-install -Su qemu python3 python3-pip
- For openSUSE Tumbleweed:
sudo zypper in qemu-tools qemu-kvm qemu-x86 qemu-audio-pa python3-pip
- For Fedora:
sudo dnf install qemu qemu-img python3 python3-pip
2. Clone this git
cd to path.
jumpstart.sh to download installation media for macOS (internet connection required). The default installation uses macOS Catalina, but you can choose which version to get by adding either
--catalina. For example:
4. Create an empty hard disk using qemu-img, changing the name and size to preference:
qemu-img create -f qcow2 MyDisk.qcow2 64G
NOTE: Change “MyDisk” to your preffered disk name. Change “64G” to your preffered disk size ( min. 20G )
sudo nano basic.sh and add this at the end:
-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \
Save the changes and exit.
NOTE: change “MyDisk” to your disk name set in previous step.
7. Boot into macOS Catalina Installer
8. Go to “Disk Utility” and format your disk
9. Once your disk is ready, you can install macOS Catalina. From now on, it’s your typical macOS install. No extra steps required.
10. You’re done! To fine-tune the system and improve performance, look in the docs folder for more information on adding memory, setting up bridged networking, adding passthrough hardware (for GPUs), tweaking screen resolution, and enabling sound features. For further support, check out the official github page.
SUPPORTFSM needs to pay for the website servers and it turns out we need a lot of coffee and quite a few slices of pizza. We're trying out an open-source and ethical ad platform (ref). Please consider whitelisting FSM in your adblocker. Or please donate and help us remove the ads.