8.7k Star! Mac OS without chopping hands

Time:2021-5-13

[introduction]: MacOS simple KVM is a set of tools for quickly installing MacOS virtual machine on QEMU of Linux, and accelerating it through KVM.

8.7k Star! Mac OS without chopping hands

Address of the project:

https://github.com/foxlet/mac…

Preparation before installation

Before installation, you need to prepare a Linux system with QEMU version above 3.1. In addition, you need python3, PIP and KVM modules, which are not required by MAC.

Here are some examples of different distributions:

sudo apt-get install qemu-system qemu-utils python3 python3-pip  # for Ubuntu, Debian, Mint, and PopOS.
sudo pacman -S qemu python python-pip python-wheel  # for Arch.
sudo xbps-install -Su qemu python3 python3-pip   # for Void Linux.
sudo zypper in qemu-tools qemu-kvm qemu-x86 qemu-audio-pa python3-pip  # for openSUSE Tumbleweed
sudo dnf install qemu qemu-img python3 python3-pip # for Fedora
sudo emerge -a qemu python:3.4 pip # for Gentoo

Next, start the installation.

The first step

Run the jumpstart.sh script to download the Mac OS installation media, which requires networking. Catalina is installed by default, but you can add parameters to select the installation version, such as – High Sierra, – Mojave, or – Catalina.

The order is as follows:

./jumpstart.sh --mojave

be careful: if you have downloaded basesystem.img, you can skip this step. In addition, if you have basesystem.dmg file, you need to use dmg2img tool to convert it.

Step two

Create an empty hard disk area with QEMU img. Set the capacity and name according to your preference. The command is as follows:

qemu-img create -f qcow2 MyDisk.qcow2 64G

Then add the above command to the end of the basic.sh file:

-drive id=SystemDisk,if=none,file=MyDisk.qcow2 \
-device ide-hd,bus=sata.4,drive=SystemDisk \

be careful: if you are using headless systems, such as cloud servers, you need – nographic and – VNC: 0 – K en US to get VNC support.

Complete the above two steps, and then run basic. Sh to install Mac OS. Remember to partition with the disk tool first.

Virtual machine management

  1. If you want to replace QEMU and import the settings into virtual machine manager for further configuration, you can use this command:
sudo ./make.sh --add
  1. After running the above command, in the newly added entry property of virtual machine, mydisk.qcow2 will be used as additional storage.

Headless system

If you use a cloud based headless system, you can quickly install VNC instances through the script headless.sh. See the following example for the definition of settings. VNC starts at port 5900 by default.

HEADLESS=1 MEM=1G CPUS=2 SYSTEM_DISK=MyDisk.qcow2 ./headless.sh

installation is complete

In the future, if you want to optimize the system and improve the performance, you need to check the description under the doc directory of this project. It can increase memory, bridge network, add pass through hardware for GPU, adjust screen resolution and sound, etc.

Open source outpostShare popular, interesting and practical open source projects everyday. Participate in the maintenance of 100000 + star open source technology resource library, including python, Java, C / C + +, go, JS, CSS, node.js, PHP,. Net, etc.