MacOS Virtualization using VMware
Tags: virtualmachine, linux, tutorial, ios
Published: 2023-11-28 11:49:24

New week new project! Back on the virtualization journey. This time I am running MacOS 14 (Sonoma) in a VM using VMware on a Linux host. And so far so good.

![MacOS on VMware](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b74fx7c4dg6jx55wh8u3.png)

## Reasons for switching from QEMU + KVM to VMware

If you saw my last update, I got MacOS running using QEMU + KVM on a Linux host.

![MacOS on QEMU + KVM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwpzgnbfyl72pmnw2cy6.png)

![Macos setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r8542e2uxvnttjf6yg6j.png)

However there a few major issues I ran into with using QEMU +  KVM:

1. I could only get MacOS 13 (Ventura) installed. Sonoma continually failed on installation and I couldn't find a fix. Maybe its because its a new version hence needing more time to develop and fix.

2. Updates were available and would download but failed to install. ( Although the system was usable I felt its important to mention)

![updates](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2v8xswh5kylfft88b4y.png)

3. Apple ID was a pain point to get working. I did apply a few tweaks to get working. This important if want use the Apple Store and by extension XCode.

It should be noted that performance was usable once proper tweaks were in place.

## Enter VMWare

Now I feel like a should preface this with: I am not championing VMware over using QEMU + KVM setup. I am a full-time Linux user for a better part of 5 years and I use QEMU as my virtualization platform of choice for Linux and Windows VMs. In this case, it's a matter of getting a the job done for this specific task. And of course the fact VMWare that its a paid closed-source product is a key point here.

Now installing a MacOS VM differs from most other guests on VMware. Lets run through the steps:

- I had to fix a well known issue with running VMware on Linux - **compiling your own kernel modules**. This isn't much of a problem for seasoned users but for others it might be a deal breaker. This [repo](https://github.com/mkubecek/vmware-host-modules) will save you hours of searching google.

- I needed to install an [unlocker](https://github.com/paolo-projects/unlocker) from GitHub to enable options in the main screen.

![VMware unlocker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lblrfp7hki8m25k5unvr.png)

- As a side note also run the **update-tools** script in the repo.

- I had to download an ISO (15 GB). Use this [link](https://shaadlife.com/download-macos-sonoma-iso/) to read more and get download links.

- Install [open-vm tools](https://github.com/vmware/open-vm-tools) (this enables a slew of optimizations).

## VM Installation

Once you have the prerequisites done. The process is relatively straightforward as outlined in this [guide](https://shaadlife.com/download-macos-sonoma-iso/). One thing to note is will take a while when running for the first time. Let it finish. Once done you should run through the first time setup and enter all the details

Note: I did 2 major issues with the VM once it finished installing.

1. No internet connectivity.

2. Frequent crashes and restarts.


![MacOS VM crash-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h179zan9v65osadeev7.png)

![MacOS VM crash-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zaz01h3k492z9nfi0wvf.png)

These errors made the VM virtually unusable. However, I found a working solution in the VMware [forums](https://communities.vmware.com/t5/VMware-Fusion-Discussions/macOS-Ventura-guest-has-no-network-connection/td-p/2912933). It outlines a fix by changing a line your vmdx file that relates to ethernet device. This worked amazing and now internet is working and the crashes have stopped. Updates and AppleID sign-in are also working.

## Conclusion

In summary, virtualizing MacOS with VMware provides several key benefits like unified application access, optimized performance through direct hardware access, and snapshots for easier testing. For most tasks, the small tradeoffs in native hardware performance are negligible. As Macs gain popularity, technologies like VMware will remain important for unlocking the platform's versatility by empowering users with choice. For power users especially, mastering virtual machines helps tap the full potential of Macs.

Thanks for reading! Free free to leave a comment below if you have any questions, suggestions or clarifications. You can also reach out to me on [Twitter](https://twitter.com/KenMwaura1). or [LinkedIn](https://www.linkedin.com/in/kennedy-mwaura/) If you found this article helpful feel free to share it with others.

Buy me a coffee [here](https://www.buymeacoffee.com/kenmwaura1).


![next-time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mthxo12c3pejx4nz6dkq.gif)