Mac OS Catalina on Ubuntu 20 — Installation, Optimization, Review & Productivity Recommendations

Since you are reading this article, I would assume that you are familiar with the benefits of the Mac OS. In this article, we will cover the OS installation, performance optimization, review of virtual machine and productivity recommendations for users working on multiple OS.

This comprehensive tutorial covers everything from installation to productive usage guide. Kindly feel free to reach out to the author over one-to-one call, in case you need additional help/suggestion.

But why should I use Mac OS?

I had the same question in my head some 5 years ago (after using Windows and various flavours of Linux for more than 8 years). I started my journey with Mac OS Yosemite and to my surprise, it was the perfect minimal operating system for almost any task (except gaming).

I have been using Windows, Ubuntu and Mac OS on different devices for over 5 years. Call it my personal preference but I enjoy working on my development projects on the Mac OS, primarily because everything works as expected.

Being a software developer, you tend to install, configure and uninstall new tools almost every day. Compared with other operating systems, Mac OS helps to do so in smoothest possible way. Most tools could be installed by drag and drop, and while you might have to work with the terminal at times, you won’t be getting frequent errors & issues. Things just work in Mac OS by default!

Disclaimer: I have been using Mac OS on Mac Book Pro. This tutorial could help you in case you want to switch to Mac but you want to try it first. Some users have achieved great performance using this method, however, it still depends on your hardware and how well you configured it.

Installation

The performance of your Mac OS will depend on how well you install and configure it. We will be following macOS-Simple-KVM method to setup Mac OS over Ubuntu. Though there could be a slightly better performance with Arch Linux, I choose Ubuntu for its excellent user community and popularity. We would be running Mac OS on QEMU emulator with KVM accelerator.

Note that this default setup will just make your Mac OS up and running. I will fine-tune its performance in the optimization section. Before we proceed, here is a list of recommended hardware requirement (based on personal experience):

Processor (CPU): 4 Cores or more
Memory (RAM): 8 GB or more
Storage (SSD): 120 GB or more free space

The system which I am using for this demonstration has Intel Core i5 7200U processor, 12 GB memory, 300 GB free storage space in SSD. I would emphasize on using an SSD rather than magnetic storage for the optimal performance. You may follow the steps mentioned below for installation.

Check if Virtualization is supported in your system

egrep -c '(vmx|svm)' /proc/cpuinfo
Command output for reference

Any numeric value above 0implies that virtualization is supported.

Next, check if your system supports KVM virtualization execute the command.

sudo apt install cpu-checker
sudo kvm-ok
Command output for reference

If everything is fine, you will see message “KVM acceleration can be used”.

Now, install the KVM on the system. You will install qemu (the emulator application), qemu-kvm (KVM package), libvritd-daemon (virtualization daemon), bridge-utils (package for network bridge) and virt-manager (GUI application for managing virtual machines)

sudo apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager

Next, check the status of virtualization daemon.

sudo systemctl status libvirtd
Command output for reference

If everything looks fine, you would enable the virtualization daemon to start on boot.

sudo systemctl enable --now libvirtd

Finally, check if the KVM modules are loaded.

lsmod | grep -i kvm
Command output for reference

Depending upon your processor, you should ideally get kvm_intel or kvm_amd present in the output.

Install the dependencies for the overall setup.

sudo apt install git qemu-system qemu-utils python3 python3-pip

Next, you will clone the macOS-Simple-KVM repository in the desired location.

cd ~
mkdir VM
cd VM
git clone https://github.com/foxlet/macOS-Simple-KVM.git
cd macOS-Simple-KVM

Now, download installation media for Mac OS. This script will download BaseSystem.img file in the directory. You can replace --catalina with--high-sierraor --mojave to download a specific version of Mac OS.

./jumpstart.sh --catalina
Command output for reference

Next, you need to create the empty virtual hard drive on which you will install the Mac OS. Make sure you change the name and size of the hard drive as per your preference.

qemu-img create -f qcow2 MacOS.qcow2 160G

You need to make corresponding changes to the below code and add the updated code in file basic.sh file.

gedit basic.sh

Add the below code at the bottom of basic.sh file. Make sure you change the name of virtual hard drive. This should match the virtual hard drive filename (from the previous step), in my case MacOS.qcow2.

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

At this stage, I would also recommend changing the default configuration in basic.sh file and increase the amount of memory (RAM) that this VM could use. The default value is 2 GB, however, I would recommend 8GB.

    -m 8G

You are ready to run the Mac OS installation. Execute the basic.sh file and follow the steps to finish the installation of Mac OS on your Ubuntu system.

Tip: Once you click in the QEMU window, you won’t be able to use your mouse on the host machine. To be able to release the mouse from the QEMU window, press Ctrl + Alt + G.

Note: The VM might restart a few times during the installation process. Each time, it will prompt for the device in which you would want to boot. Since the desired one is pre-selected, do not change the selection in Clover Boot Menu.

./basic.sh
Clover boot Manager — Select the MacOS icon using keyboard and press enter key
macOS Utilities — Select Disk Utility
Disk Utility — Look for the drive (from left) having approximately same size as that of the virtual hard drive made in previous steps. In our case, this 171.8 GB drive is the one. Click on erase upon selection of the drive.
Disk Utility — Give it a suitable name, example, Mac OS, and then click on erase.
Disk Utility — The drive with updated name appears with mostly free space. Close the Disk Utility window.
macOS Utilities — Select the Reinstall macOS and click continue
Install macOS Catalina — Click on continue.
Install macOS Catalina — Accept the terms by clicking on Agree.
Install macOS Catalina — Select the drive we created previously and click on Install.
Install macOS Catalina — Allow the Mac OS to be installed. This process might take some time and might use internet connection as well. It would be a good idea to keep moving mouse every few minutes, to avoid system sleep.

In order to perform future execution and configuration of this VM, you should add it to the Virtual Machine Manager.

sudo ./make.sh --add

Finally, you should have a VM running Mac OS on your Ubuntu system, however, you might have noticed several flaws and performance issues.

Going forward, you can run Mac OS VM by pressing super key (also known as Windows or Command key) and searching for Virtual Machine Manager.

Virtual Machine Manager — Select the VM and click on Open to view VM details or Play icon to start the VM. In order to configure the VM in GUI, you would need to select the VM and click Open, and then click on info logo.
Virtual Machine Manager — Click on Add Hardware button in bottom left. We will add our virtual hard drive.
Add New Virtual Hardware — Select storage and choose “Select or create custom storage”, then click on Manage
Choose Storage Volume — Click on Browse Local and then select the virtual hard drive. If you followed the exact same process, it would be inside the macOS-Simple-KVM in the VM folder in your home directory.
Add New Virtual Hardware — Click on Finish to save the changes. You will see a SATA Disk 3 added in the left.

Note: Changing certain configurations can ruin the entire effort and make the VM unusable. Kindly do not change any configuration without proper knowledge.

Optimization

The default installation of Mac OS using the above method works just fine, however, there could be several improvements to this setup. I would discuss each of these issues and ways to address them in this section.

Firstly, I would list down all major issues. You may or may not face these issues due to different system configurations. I noticed the following major points which we will address in this part:

  1. Improper Processor configuration
  2. Improper Memory configuration
  3. High Input lag (keyboard/mouse)
  4. Incorrect Screen Resolution & Aspect Ratio

You can specify the number of cores and threads that the VM can use. These values will be less than the total number of cores and threads your processor supports. I would recommend that you don’t allocate 100% of your CPU resource to the VM since you would need some resources reserved for the host OS to run smoothly. Follow the steps mentioned below to configure:

Virtual Machine Manager — Select the VM and click on Open to view VM details. Then click on the info icon to view/change the configurations. Do not change the configurations unless you are sure about it.
Virtual Machine Manager — Click on CPUs section and modify the values based on your CPU. Make sure you click on Apply bottom on bottom right to save the changes.
You may take help from the product website to check the number of cores and threads on your CPU. I had 2 cores, 4 threads each so I allocated 2 threads per core to the VM. You can pick the values according to your CPU keeping in mind that you do not allocate 100% resource to the VM.

You can specify the amount of memory (RAM) that the VM can use. The values will be less than the total memory (RAM) available on the system. I would recommend that you keep a sufficient amount of memory reserved for the host and allocate sufficient memory from the remaining available memory to the VM. For example, in my system with 12 GB memory, I reserve 4 GB memory for the host and allocate 8 GB to VM. This will ensure that the host OS runs smoothly. Follow the steps mentioned below to configure:

Virtual Machine Manager — Select the VM and click on Open to view VM details. Then click on the info icon to view/change the configurations. Do not change the configurations unless you are sure about it.
Virtual Machine Manager — Click on Memory section and modify the values based on your system. Make sure you click on Apply bottom on bottom right to save the changes.

I noticed the high input lag in my setup, however, you may or may not face this issue. Even though there is still some amount of noticeable input lag, it has improved significantly by using a separate mouse for the virtual machine (this mouse won’t work in the host OS simultaneously).

Virtual Machine Manager — Select the VM and click on Open to view VM details. Then click on the info icon to view/change the configurations. Click on the Add Hardware button in bottom left and select USB Host Device.
Add New Virtual Hardware — Select the desires USB device (keyboard/mouse receiver) and click on finish. You will be able to use this device inside the VM.

You might have noticed that the resolution and aspect ratio of the VM does not match the original screen resolution and aspect ratio of your display. This could be addressed by changing the Video Model from the Virtual Machine Manager Configuration. One may switch between the Models (QXL, VGA and Virtio) and check for available screen resolutions.

Virtual Machine Manager — Select the VM and click on Open to view VM details. Then click on the info icon to view/change the configurations.
Select the Video option in the left and then select the Model.
Available option(s) after selecting QXL and Virtio Video Model in our setup.
Available option(s) after selecting VGA Video Model in our setup.

Review of the Virtual Machine

I would not recommend using this setup for any serious work. I would instead recommend buying a real Apple device, since the reliability and performance of those devices are far better than any virtual machine.

Having used Mac OS extensively for years on Mac Book Pro, I noticed that they focus more on the overall experience rather than just software or just hardware. Example, touch bar, which is a blend of hardware & software that enhances productivity.

The only use case that pops in my head is to try this VM to get familiar with Mac OS, and maybe trying a few of your favourite applications on this OS. A lot of you might have used Windows and Linux, however, chances are this VM could be your first interaction with Mac OS. I believe that many of you might have never tried this operating system since one may hesitate to invest a premium amount for an experience they have no idea about. I would recommend visiting the nearest Apple store and try the same OS on a real device to get amazed by the performance difference.

If you are looking for any serious work, you must purchase a real Mac Book or iMac. It might be impossible to use all your current hardware through this VM. One might argue that they can use PCI passthrough, however, there are limitations (set aside the complicated and risky steps involved in PCI passthrough setup).

Productivity Recommendations

Here are a few points for beginner to advanced users that would help in increasing their overall productivity, especially if you plan to work on multiple OS using virtualization (including Ubuntu & Mac OS). These recommendations are for all sorts of users, irrespective of their use-cases:

  1. Cloud-Based File Synchronization
  2. In case you are using multiple devices, especially multiple OS, it becomes crucial to synchronize files between them all. MEGA is one such solution that works well on all major OS, plus you get 50+ GB of cloud space !!!
  3. URL: https://mega.nz/aff=Xy6rNVzXiSY
  4. Cloud-Based Backup & Restore
  5. It takes a lot of time and effort in fine-tuning your workstation. Since you are reading this article, I would assume that most of you tweak your workstations regularly. It’s a nightmare to accidentally change a few settings and get your system corrupt. Also, it might sound lazy but most of us don’t take frequent backups, especially on external drives. This is where automatic regular backup tools and some cloud storage solutions can help. You can get cloud space at low cost and use it with Time Machine (Mac OS), Timeshift (Ubuntu) and Windows Backup. I use MEGA for this purpose as well.
  6. Chrome Browser with User Profiles
  7. Most of us use Chrome as default browser and it could be a nightmare to use it on multiple devices, signing in on various websites, remembering passwords. You can organize things elegantly using user profiles. You can directly sign-in in Google Chrome and synchronize passwords. You can even segregate your profile from your professional/work profile.
  8. Multiple Monitor Setup
  9. We tend to perform multiple tasks at times, however, it’s very common to get frustrated/overwhelmed by so many application windows. During various works, we are required to frequently switch between to have a view of multiple application windows. Multiple screen setups are essential for such cases. I would recommend going for 34-inch ultra-wide monitor.
  10. Night Light (Blue Light Filter)
  11. If you tend to work on your workstation in the night or struggling with poor sleep, you must set this immediately. All major OS has support for this, however, you must select an appropriate level of blue light filter individually on all your devices. In some cases, your VM might not show the option for the night light. In such cases, you can set it correctly on the host OS itself.

I hope that this article or some parts of it were useful. Feel free to connect with me for further discussion on topics like these.

Tech-savvy wanderlust exploring good food and life..