UTM for Developers

UTM for Developers

UTM makes it easy to set up and manage macOS and Windows virtual machines. This can be especially useful for developers such as Tauri contributors who need to test their applications across multiple platforms, or for those looking to experiment with different operating systems without affecting their primary system.

In this tutorial, we set up macOS and Windows virtual machines on UTM, a macOS application that provides a GUI wrapper for QEMU, a powerful open-source emulator and virtualizer. UTM allows you to easily manage and run virtual machines without memorizing complex commands. It also has special handling for macOS, making it simpler to install compared to other virtual machine software.

Before you get started, download and install UTM.

Setting up a macOS Virtual Machine

To create a macOS virtual machine:

  1. Click on “Create Virtual Machine”

  2. Choose “Virtualize”

  3. Select “macOS 12+”

  4. Select an IPSW (iPhone Software, although this name is used for all Apple operating systems) or let UTM download it automatically

  5. Configure system settings like CPU cores and storage

  6. Save the configuration and UTM will automatically download the macOS installer and install the OS on the virtual hard drive

macOS Step 7

macOS Step 8

Setting up Windows Virtual Machine

For a Windows virtual machine:

  1. Make sure you have the necessary prerequisites installed (such as Homebrew). See the instructions provided in the Windows install guide on the UTM website for detailed information. Here’s the guide for Windows 11 from UTM’s website

  2. Build the Windows ISO file

Windows OS 1

Windows OS 2

Windows OS 3

Windows OS 4

Windows OS 5

  1. Create a new virtual machine in UTM and choose “Windows”

  2. Uncheck the “Directly boot ISO/CD image” option and ensure “Install drivers and SPICE tools” is checked

  3. Upload the ISO file you created earlier

  4. Configure other settings like memory, CPU cores, and storage as needed

  5. After saving the configuration, UTM will boot the Windows installer, and you can follow the usual Windows installation process

Windows OS 9

Windows OS 10

Windows OS 11

Managing Virtual Machines

Both macOS and Windows virtual machines can be customized and managed through UTM’s user interface. You can adjust settings, add devices, and even set up shared folders to share files between the host and guest operating systems. Shared folders serve as a great method for passing files between the host OS and the VM guest. In order to make this possible:

  • Enable the shared folder in the macOS settings under “General” > “Sharing” > “File Sharing”

  • Locate the shared folder in “/users/<user>/Public” (Note: you can drag the folder into the sidebar for easier access)

  • The VM guest will now show up in your host machines Finder under “Network”

Shared Folder Step 1

Shared Folder Step 2

Shared Folder Step 3

Shared Folder Step 4

For more detailed guidance on setting up and managing virtual machines with UTM, you can watch the livestream replay on YouTube.


Author: Jonas Kruckenberg, DevRel