DEV Community

Cover image for How to Use macOS 26 Beta Inside a VM Without Third-Party Apps
Sergei
Sergei

Posted on • Edited on

How to Use macOS 26 Beta Inside a VM Without Third-Party Apps

It's been a month since WWDC'25, and I've watched almost all the sessions I'm interested in (by following my guide). Now, I've decided it's time to try out the new Xcode 26 on macOS 26, specifically to see how Coding Intelligence works.

Since I only have one personal MacBook and don't want to install the beta version of macOS on it (I believe this should be done on a spare device rather than your main one), I decided to use a virtual machine.

If you're an Apple platform developer, you can easily install the macOS 26 Tahoe beta version in a virtual machine without installing any additional software.

Requirements: macOS 14.0+ and Xcode 16.0+.

Apple provides a Sample Code project with official code for "Installing and running macOS in a virtual machine using the Virtualization framework."

Download and extract this Xcode project.

The project contains several targets: one for installation and one for running the virtual machine (each available in Swift and Objective-C). Let's start with installation.

Installation

  1. Open the project in Xcode (I'm using Xcode 26 beta 2, but it should also work with the release version of Xcode 16).
  2. Select the InstallationTool-Swift target and open the MacOSRestoreImage.swift file. InstallationTool-Swift target
  3. By default, this tool fetches and installs the latest publicly available release version of macOS. We need to specify the URL for the beta restore image instead.
  4. To find the restore image for the latest beta, go to https://developer.apple.com/download/, scroll to the current macOS beta section, and copy the link for "Mac computers with Apple silicon.": Address to the restore image of macOS
  5. Use this address in the updated MacOSRestoreImage.swift file. Replace the default URL with the one you copied and change the download and downloadRestoreImage methods to the following:
public func download(completionHandler: @escaping () -> Void) {
    NSLog("Attempting to download latest available restore image.")
    if let url = URL(string: "URL TO ipsw GOES HERE") {
        downloadRestoreImage(url: url, completionHandler: completionHandler)
    }
}

private func downloadRestoreImage(url: URL, completionHandler: @escaping () -> Void) {
    let downloadTask = URLSession.shared.downloadTask(with: url) { localURL, response, error in
        if let error = error {
            fatalError("Download failed. \(error.localizedDescription).")
        }

        guard (try? FileManager.default.moveItem(at: localURL!, to: restoreImageURL)) != nil else {
            fatalError("Failed to move downloaded restore image to \(restoreImageURL).")
        }

        completionHandler()
    }

    downloadObserver = downloadTask.progress.observe(\.fractionCompleted, options: [.initial, .new]) { (progress, change) in
        NSLog("Restore image download progress: \(change.newValue! * 100).")
    }
    downloadTask.resume()
}
Enter fullscreen mode Exit fullscreen mode
  1. I also recommend increasing the amount of RAM allocated to the virtual machine. By default, Apple's example sets it to 4GB, which is too low for Tahoe. Allocate at least 8GB, or preferably 16GB or more if possible. Change this in the computeMemorySize() method in MacOSVirtualMachineConfigurationHelper.swift: Change memory size
  2. Now we are ready to run the InstallationTool. (Don't forget to change the Signing Certificate to Sign to Run Locally in the Signing & Capabilities settings): Signing & Capabilities settings
  3. After launching, the tool will download the restore image and install the virtual machine. This may take some time. Once complete, the utility will exit with code 0:

VM installation succeeded

Using the VM

  1. Select the macOSVirtualMachineSampleApp-Swift target, change the Signing Certificate to Sign to Run Locally and run it: macOSVirtualMachineSampleApp
  2. The app will launch, and you'll have a new virtual machine instance with macOS 26 beta. The standard macOS installer will appear; follow the usual steps to install macOS. Get Started
  3. After completing the initial setup and creating an account, you'll be greeted by a freshly installed macOS 26: Welcome

Now, you're all set to start vibe-coding in Xcode 26 using Coding Intelligence. I'll cover that next time—stay tuned!

Top comments (0)