Setting up a Sonoma VM
Here's some cool software I like and use.
I have been using the new Xcode 15 beta to try out the new SwiftUI language features, and I ran into a problem. My Mac would not build code for macOS as a target. I had to upgrade but did not want to do it on my main system.
Installing Sonoma on an external drive and booting it up from there would provide me with the best experience, but it is a bit of work. In the end, I just wanted to play and preview some code. Moreover, I read that betas almost invariably involve firmware updates, so even if you install the beta on an external disk, it will change your Mac’s firmware. Undoing that is hard. (from eclecticlight again)
There are two ways to run Sonoma in a virtual machine for free. One is the Viable freeware app developed by Howard Oakley (he also has a fantastic blog, https://eclecticlight.co, which is worth checking out).
His app uses the Virtualization framework from Apple to download, install and run macOS guests. The other app is an open-source project, VirtualBuddy, which is now in version 1.3 Beta 1 and needs to be downloaded from GitHub and compiled.
Both apps don't allow the use of Apple ID connections, which means that the VM can’t run App Store apps at all, except for Apple’s free apps.
I have been trying out the latest Viable beta (clicking on the link will start the download) and will describe briefly the advantages to use virtualisation to install and preview the new beta version of macOS.
The interface is very easy to understand. I need only to pass the settings I need.
A word of warning, be careful about the amount of disk memory to give for your VM because it is not possible to change it later!
Other settings are for the display and if you like some folders to be common between both systems. The Internet connections will be passed to the VM.
The display resolution is the same as the one I currently use on my MacBook Pro, and
HiDPI, (High Dots Per Inch) is the technical name for Apple's "Retina Display".
I downloaded the IPSW restore image for Sonoma Beta 3 from here.
The size of the file is 14 GB and It took a while... and this will be done for each new beta. When Apple will release a new version I will have to download the new IPSW file and create a new VM. Since I cannot sign in with my Apple ID I will not be able to update the software but will have to reinstall it.
Once the image has been downloaded I click on 'Install', and a bundle will be created on my hard disk. A fresh copy of Sonoma will be waiting for me in a window on my Mac after a few minutes. So easy!
The first thing I did after setting up my user name and finishing the installation was to install the last Xcode 15 beta of course. Everything is very much painless! Most of the time has been spent waiting for these huge downloads to finish!
My first impression of macOS Sonoma is quite familiar. The lock screen feels closer to the one on my iPhone. I can't speak now about the new features, which I will test shortly. I expect that it will be much easier to create good-looking mac apps with SwiftUI.
If you are asking yourself why we are not just running the OS in a Docker Container here there are some explanations as why it is not a good idea for Mac Sonoma.
Virtualisation boots up its own guest OS. A Container runs on top of the host's operating system. Link here.
Some common problems
Because the connection to the Apple accounts is not allowed, I cannot sign in in Xcode with my Apple ID and therefore my apps cannot run on hardware. I can only use the simulator since I cannot sign the code.
Subscribe to my newsletter
Read articles from laurent brusa directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
laurent brusa
laurent brusa
Hi there 👋 My name is Laurent and I am an iOS Developer based in Berlin.👨🏻💻 Please have a look at my portfolio. And at my CV! My area of interest include: • Programming in Swift. • UIKit with both storyboards and programmatic UI. • Develop cross-platform native apps with SwiftUI. 📫 You can also DM me on Mastodon or Bluesky!