06 January 2021

Intel x86 Windows on Apple Silicon Mac with UTM app is easy and hot

Intel and Arm Windows running
on UTM on M1 MacBook Air
Using Microsoft Windows on M1 Mac is our dream.
The biggest hurdle is the architecture change of Mac.

Various technologies exist to execute other operating systems on the host macOS.

  • Rosetta 2:
    Apple's own machine code translation technology.
    It translates user code of macOS application and converts library call to native library call.
    In addition to machine code translation, Rosetta 2 utilizes Apple Silicon's own instruction set that specializes in Intel emulation.
    In conjunction with both library call conversion and special instruction set, Rosetta 2 is very efficient (200% compared on M1/Intel MacBook Air) to execute Intel code on Apple Silicon.
    But it is limited to execute macOS app.
  • Boot Camp:
    macOS Boot Camp is dual-boot technology, so it is not suitable to execute Intel Windows on Apple Silicon, and it is not available on Apple Silicon macOS (at least currently).
  • Virtualization (Hypervisor is the same meaning):
    Virtualization is a mechanism to execute other full OS codes in the same architecture as the host OS.
    Nowadays, virtualization is provided by kernel and hardware mechanisms, so it provides about 90% native speed.
    But it is limited to execute the same CPU architecture to host architecture.
    The macOS provides two frameworks: the Hypervisor Framework is a low-level virtualization API and the Virtualization Framework is a high-level and easier to use API to execute Linux.
    Arm Windows can be executed on macOS Hypervisor Framework (but not Intel Windows).
  • Microsoft's Intel emulation layer on Arm Windows:
    It is similar technology to Rosetta 2 on macOS.
    But it cannot utilize Apple Silicon's proprietary code, neither Arm Windows is not generally licensed yet.
  • Wine:
    Wine is a solution to execute a Windows app on non-Windows operating systems (Linux and macOS).
    It simulates Windows library, and it is written in native Intel architecture.
    It is possible to run Wine to execute many of the Windows apps on macOS using Rosetta 2.
    The drawback is the compatibility.
    Some of the apps are not able to be run on Wine.
  • QEMU:
    QEMU is a famous CPU instruction emulator on Linux, and it can also execute Arm code on Intel or Intel code on Arm vice-versa.
    When QEMU executes the same architecture operating system, it can utilize hardware virtualization and it is very efficient.
    In the case of different architecture, it emulates a full stack of the operating system: all of the app code, library code, and kernel code.
    It is truly possible, but not so efficient as Rosetta 2 or native Arm Windows (1/4 - 1/8 performance).

After my trial written in the previous post, I am going to research better ways to execute Intel Windows on Apple Silicon Mac.

Finally, I found the UTM app that is originally developed for iOS and now the macOS version is released.
UTM app is based on QEMU for Intel code since it was born, and it also utilizes macOS Hypervisor Framework for Arm code.
UTM is the current easiest way to execute both Intel and Arm Windows on Apple Silicon Mac.
Because UTM is based on QEMU (full emulation), it can utilize all 8 cores of Apple Silicon and makes Mac really "hot" when executing some apps on Intel Windows.

[Japanese version of this post]

[2021-01-08] Simplified the title from
<Intel x86_64 Windows (not Arm) running on Apple Silicon M1 MacBook Air using UTM app>
to
<Intel x86 Windows on Apple Silicon Mac with UTM app is easy and hot>

[2021-01-17] I wrote a new post since UTM app is widely available at new web site, and pre-build guest images are available.

No comments:

Post a Comment