How To Install MacOS Catalina on Linux PC

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.

More info.

DEPENDENCIES

  • Qemu 3.1 or later
  • python3
  • pip
  • KVM modules enabled
  • A Mac computer is NOT required

INSTALL

  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

image

  1. Clone this git https://github.com/foxlet/macOS-Simple-KVM.git and cd to path.

image

image

  1. Run 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 --high-sierra , --mojave , or --catalina . For example: ./jumpstart.sh --mojave

image

image

image

  1. 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 )

image

  1. Edit basic.sh with 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.

image

  1. Run ./basic.sh

image

  1. Boot into macOS Catalina Installer

  1. Go to “Disk Utility” and format your disk

  1. Once your disk is ready, you can install macOS Catalina. From now on, it’s your typical macOS install. No extra steps required.

  1. 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.

6 Likes