How to build a custom macOS VM on Apple silicon

Looking at how Software Update and the softwareupdate tool work is difficult using real Macs, because of the time it takes to set up macOS in just the right state. In this case, I wanted a recent but superseded version of Ventura with old versions of XProtect and other security systems. The simplest and most reliable way to create that was using a virtual machine (VM) running on an Apple silicon Mac, with the latest version of my free virtualiser Viable. This article steps through how I did that in less than 15 minutes.

I keep a library of VMs and the IPSW image files to create them on a Thunderbolt 3 external SSD that never gets snapshots made of it, nor is it backed up. I do keep separate copies of IPSWs and some VMs, but most of my VMs are built for a specific task and disposable afterwards.

In this case, my target macOS was 13.4, which is far enough behind us to be well out of date for its security data files, but not so old that it should operate much differently from 13.5.1. Having downloaded the 13.4 IPSW from Apple, via Mr. Macintosh’s compendium, I added that to my library, then duplicated it with Command-D. In APFS, of course, no copying is involved: instead, it provides an easy way for that clone file to be used to build a VM with minimum fuss.

I then installed that IPSW copy into a virtual disk of 100 GB using Viable’s Install… button. I used to use 50 GB for similar work, but as the main disk image within the VM is stored as a sparse file, there’s no point in being mean as it will still take the same amount of space on disk.

vmold01

Once the installation is complete, I moved the IPSW file from inside the VM bundle using the Move IPSW… button, and trashed that clone file, leaving the original IPSW still safe in my library.

vmold02

Configuring the VM for its first run is the first critical step. Normally, given a network connection, that first run might try to install outstanding updates. To prevent it from doing so, I thus turned the network connection off in Viable’s Network popup menu. Although the fresh VM doesn’t yet have any saved settings, to be sure that those would be written inside the VM bundle I enabled both override and overwrite of Saved settings. Otherwise, I configured it as I would do for most other VMs.

vmold03

Without a network connection, the first run needs a bit more persuasion, when it prompts me to connect it to the Internet. It tries this twice, but all I do is click Continue on both dialogs, and it finally accepts that decision.

vmold04

Normally with these lightweight VMs on their first run, there are two screens that need to be dismissed with the Not Now option: the first is for migration, and the second to sign in with an Apple ID. At least without an Internet connection, it doesn’t waste time asking for my Apple ID.

vmold05

Otherwise the first run is straightforward, although the VM invariably starts up in Cupertino time. As soon as I can, I open its General settings, select Date & Time, and set its time zone manually. This is important when you’re going to access the VM’s logs.

vmold06

In this case, I next wanted to turn all automatic updates off, so visited Software Update settings to do that. I then completed the first run configuration by setting the Finder’s windows up, ready to run my first set of tests in the VM. As those required a network connection, I shut down the VM to reconfigure the settings for its next run.

The only difference on that run was switching its network to use bridged Ethernet. I then ran the VM again, all ready to start testing Software Update in manual mode.

vmold07

To keep a library of VMs running older versions of macOS, you can leave Software Update with all its automatic options disabled and manually install security data updates such as XProtect, either using softwareupdate or SilentKnight. While the VM will still display the red badge telling you that a macOS update is available, it will stick to the original version of macOS that you want for reference, research or testing. Who needs the complexities of dual-booting?