Virtualizing Linux, macOS, and Windows ARM64 versions on an M1 Mac via UTM/QEMU offers impressive performance, even on modest hardware like the base 2020 Mac mini (4GB of 8GB RAM and 4 CPU cores of 8 dedicated to the VMs). In testing, boot times ranged from 9 to 14 seconds and Geekbench 5 scores from 1492-1690 (single-core) to 3263-5850 (multi-core).
An official gallery of VM settings is available, but installation is as easy as "Create a New Virtual Machine" → "Virtualize" and selecting "macOS 12+", "Windows", or "Linux".
apt update was misbehaving right out of the box:
apt updateIgn:1 cdrom://[Debian GNU/Linux 11.3.0 _Bullseye_ - Official arm64 DVD Binary-1 20220326-11:23] bullseye InRelease Err:2 cdrom://[Debian GNU/Linux 11.3.0 _Bullseye_ - Official arm64 DVD Binary-1 20220326-11:23] bullseye Release Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs Hit:3 http://deb.debian.org/debian bullseye InRelease Hit:4 http://deb.debian.org/debian bullseye-updates InRelease Hit:5 http://security.debian.org/debian-security bullseye-security InRelease Reading package lists... Done E: The repository 'cdrom://[Debian GNU/Linux 11.3.0 _Bullseye_ - Official arm64 DVD Binary-1 20220326-11:23] bullseye Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
Resolved by commenting out the DVD reference in /etc/apt/sources.list.
Share host directories by clicking the folder icon at the top right corner of the VM's window. Shared folders can be accessed in MATE via Caja → "Browse Network" → "Spice client folder". If you receive "Unable to access location. HTTP Error: Could not connect: Connection refused", wait a few minutes or try the terminal.
Shave a few more seconds off of booting:
Unprivileged users can run
systemctl poweroff and
systemctl reboot to shutdown and reboot in the terminal (even root must prepend
shutdown -h now).
If you select "Dark theme option..." for command line installation, the MATE theme will default to High Contrast Inverse (though oddly only if a network mirror is specified during setup); change in System → Preferences → Look and Feel → Appearance.
Install SPICE Guest Tools: As above. Shared folders can be accessed in GNOME via Files → "Other locations" → "Spice client folder".
Setting the Desktop background to a solid color requires more effort than it should:
gsettings set org.gnome.desktop.background picture-uri ""
gsettings set org.gnome.desktop.background primary-color '#3A6EA5'
Other sharing options include SSH/SFTP (via System Preferences → Sharing → Remote Login), Iconfactory's new WorldWideWeb (just in time to replace
python –m SimpleHTTPServer since Apple has pulled Python (with Ruby and Perl to follow; what's next, Apple? ed?!)), and KDE Connect (reminiscent of the abandoned NitroShare and Dukto, though file sharing proved elusive in cursory testing (admittedly, there is this disclaimer: "Building on macOS is still an experimental feature, it's not stable and could not be launched as other applications on macOS. Please do not use it in your production environment!")).
Big Sur ARM VMs are not supported:
ISO: UTM's Windows 11 guide recommends using Microsoft's Windows 11 on ARM Insider Preview (a pre-built ARM64 VHDX VM) while others suggest downloading a Windows 11 ARM ISO from Microsoft via UUP dump (another commenter shares that, "If you have access to MVLS, the Arm64 ISO can now be downloaded there: Windows 11, version 21H2 (updated Apr 2022) Arm64 English 64 bit 5370 MB ISO").
You need a Windows 11 ARM64 product key. Technically, there was nothing that prevented you from using any Windows 11 key to do this, as Windows product keys are not architecture-specific, so you can use the same key with x86 (RIP), x64, and ARM64 OSes. But Microsoft made statements via spokespeople saying this wasn’t supported. For example, this article on the Verge contained a quote from Microsoft:
“Microsoft only licenses Windows 10 on ARM to OEMs,” says a Microsoft spokesperson in a statement to The Verge. We asked Microsoft if it plans to change this policy to allow Windows 10 on ARM-based Macs, and the company says “we have nothing further to share at this time.”
Fortunately, they had something to share later, again through an official Microsoft spokesperson (that faceless PR-driven process where press or analysts can ask Microsoft for an official response to a question). A lengthy Twitter thread on the topic (driven by a new ARM64-based mini-desktop computer that ships with Windows 11 but without a license — until that was changed by the manufacturer of the device to say that it did indeed include a license) pointed to a blog post from Wes Miller, an analyst and licensing expert with Directions on Microsoft. That post included this quote:
Yes customers can use retail copies to run Windows 10/11 on Macs, including ARM Macs. The Windows retail EULA does not have any use rights restrictions on the type of device you install Windows on. Note that the EULA does stipulate that not all versions of Windows are supported on all device types, so theoretically customers could run into compatibility issues with performance & support case by case, but this is not a licensing restriction. Customers can find more details on compatibility at https://aka.ms/minhw.
Install SPICE Guest Tools and QEMU Drivers via this ISO image.
UTM's file sharing works seamlessly via the folder icon at the top right corner (shares map to drive Z:), but the default file size limit for WebDAV is just 50MB (resulting in errors like "The file size exceeds the limit allowed and cannot be saved." when transferring larger files); increase it to the maximum size of 4GB by changing the value of HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\ FileSizeLimitInBytes from 50000000 to 4294967295 (=ffffffff in hexadecimal, "the max limit for a 32-bit DWORD").
For transfers exceeding 30 minutes, Microsoft suggests increasing the value of HKLM\System\CurrentControlSet\Services\MRxDAV\Parameters\ FsCtlRequestTimeoutInSec from the default 1800 (seconds) to 3600.
For transferring files over 4GB,
tar come in handy (Microsoft added LibArchive's
tar in 2018); here's an example of splitting an 11GB file on the macOS host and joining/untarring it in the Windows VM:
split -b 3G mail.tar "mail.tar.part"
copy /b mail.tar.partaa+mail.tar.partab+mail.tar.partac+mail.tar.partad mail.tar && tar -xvf mail.tar
Windows on Arm runs all x86, Arm32, and Arm64 UWP apps from the Microsoft Store. Arm32 and Arm64 apps run natively without any emulation, while x86 apps run under emulation. ... In addition to UWP apps, Windows on Arm can also run Win32 desktop apps compiled natively for Arm64 as well as your existing x86 Win32 apps unmodified, with good performance and a seamless user experience, just like any PC. These x86 Win32 apps don’t have to be recompiled for Arm and don’t even realize they are running on an Arm processor. ... Initial support for x86-64 applications was added in build 21277, and is currently being developed further."
When Windows 10 on ARM first launched, emulation was limited to 32-bit x86 apps, but almost a year ago Microsoft began rolling out test builds of Windows 10 on ARM with support for 64-bit emulation. Now the company is announcing that x64 emulation has graduated from beta and it’s generally available for Windows 11 on ARM. But it will no longer be an option at all for Windows 10.
Enable "Force Multicore" in System → CPU for better performance.
USB flash drive plug-and-play worked in Debian and Ubuntu VMs (though macOS reported "Disk Not Ejected Properly. Eject "foo" before disconnecting or turning it off." when connecting), but not Windows ("USB device not recognized. The last USB device you connected to this computer malfunctioned, and Windows does not recognize it.") or macOS VMs.
UTM stores VMs on the host in ~/Library/Containers/UTM/Data/Documents/ by default, though they can be moved easily now.
Like Docker and xhyve, UTM uses Apple's Hypervisor framework "to run ARM64 operating systems on Apple silicon at near native speeds" (Docker also offers the new Virtualization framework as an experimental option, though the consensus in this reddit thread is to stick with Hypervisor).
What are the advantages of the new Virtualization Framework in macOS Big Sur? "[T]he Virtualization Framework is just a new layer on top of the old Hypervisor Framework to offer simpler APIs for creating VMs."
Sometimes when trying things out in the OS installed in one of the virtual machines, things might break, requiring a full install of the guest operating system again, which is a pain. Thanks to APFS cloning though, you can just duplicate a virtual machine within your library folder (using Command + D in Finder), and the copy will take almost no additional disk space. This way you can have a 'clean' copy of your VM, do whatever you want with a duplicate of it, and then throw the copy away and re-duplicate the clean version if things break.
More on APFS cloning from Mike Bombich, author of Carbon Copy Cloner:
APFS cloning allows the user to instantly create copies of files on the same volume without consuming extra storage space. When cloning a file, the file system doesn’t create copies of the data, rather it creates a second reference to the file that can be modified independently of the first file. The two files will share storage on the disk for portions of the files that remain identical, but changes to either file will be written to different parts of the disk.
created: 2022.06.11, updated: 2022.06.25