UTM System Emulator and Virtual Machine Host

repository·main·Indexed 12 days ago

https://github.com/utmapp/utm

A system emulator and virtual machine host for iOS and macOS based on QEMU. UTM allows users to run multiple operating systems, such as Windows and Linux, on Apple hardware using a layered architecture that supports both QEMU emulation and Apple's Virtualization.framework.

Tokens
9.9K
Snippets
19
Records
56
Agent score
93%

What's inside UTM

  1. Overview of UTM

    main

    UTM is a multi-purpose system emulator and virtual machine manager for iOS and macOS, built on top of QEMU. It allows users to run various operating systems, such as Windows and Linux, directly on Mac, iPhone, or iPad devices.

    Core Features:

    • Full System Emulation: Uses QEMU for MMU, device emulation, etc.
    • Processor Support: Supports over 30 architectures, including x86_64, ARM64, and RISC-V.
    • Display Modes: Supports VGA graphics mode (using SPICE and QXL drivers) and text mode (console).
    • Peripherals: Supports USB devices.
    • Performance: Utilizes QEMU TCG for JIT (Just-In-Time) acceleration.
    • Native UI: A custom frontend designed for macOS 11+ and iOS 11+ using modern APIs.
  2. Overview of UTM virtualization and emulation

    main

    UTM is a full system emulator and virtual machine host for iOS and macOS, built directly on top of QEMU. It allows you to run operating systems like Windows and Linux on Mac, iPhone, and iPad.

    Key capabilities include:

    • Full System Emulation: Emulates MMU, devices, etc., using QEMU.
    • Processor Support: Supports over 30 architectures, including x86_64, ARM64, and RISC-V.
    • Graphics & Terminal: Supports VGA graphics mode via SPICE and QXL, as well as text terminal modes.
    • Peripherals: Supports USB devices.
    • Acceleration: Uses QEMU TCG for JIT-based acceleration.
    • macOS Specifics:
      • Uses Hypervisor.framework and QEMU for hardware-accelerated virtualization.
      • Supports running macOS clients via Virtualization.framework on macOS 12+.
  3. Overview of UTM features and capabilities

    main

    UTM is a full system emulator and virtualization host for iOS and macOS based on QEMU. It allows running operating systems like Windows and Linux on Mac, iPhone, and iPad.

    Core Features:

    • Full System Emulation: Uses QEMU for MMU, device emulation, etc.
    • Architecture Support: Supports over 30 processor architectures, including x86_64, ARM64, and RISC-V.
    • Graphics & Terminal: Supports VGA graphics mode via SPICE and QXL, as well as text terminal mode.
    • Peripherals: Supports USB devices.
    • Acceleration: Uses JIT-based acceleration via QEMU TCG.
    • Native Frontend: Built specifically for macOS 11+ and iOS 11+ using modern APIs.

    macOS Specific Features:

    • Hardware-accelerated Virtualization: Uses Hypervisor.framework and QEMU.
    • macOS Guest Support: Can run macOS guest systems using Virtualization.framework on macOS 12+.
  4. Overview of UTM Emulator

    main

    UTM is a full system emulator and virtual machine host for iOS and macOS, built directly on QEMU. It allows users to run operating systems like Windows and Linux on Mac, iPhone, and iPad devices.

    Core Capabilities:

    • Full System Emulation: Emulates MMU, devices, etc., via QEMU.
    • Processor Support: Supports over 30 architectures, including x86_64, ARM64, and RISC-V.
    • Graphics & Terminal: Supports VGA graphical mode (via SPICE and QXL) and text terminal modes.
    • Peripherals: Supports USB devices.
    • Acceleration: Uses QEMU TCG for JIT-based acceleration.
    • Native UI: Designed for macOS 11+ and iOS 11+ using modern Apple APIs.
  5. Overview of UTM System Emulator

    main

    UTM is a full-featured system emulator and virtual machine host for iOS and macOS, built on top of QEMU. It allows users to run various operating systems such as Windows, Linux, and more on Mac, iPhone, and iPad devices.

    Core Features

    • Full System Emulation: Uses QEMU for complete system emulation (MMU, devices, etc.).
    • Processor Support: Supports over 30 processors, including x86_64, ARM64, and RISC-V.
    • Graphics & Terminal: Supports VGA graphics mode via SPICE and QXL, as well as text terminal mode.
    • Peripherals: Supports USB devices.
    • Acceleration: Uses QEMU TCG for JIT-based acceleration.
    • Native UI: A frontend designed from scratch for macOS 11+ and iOS 11+ using modern APIs.
    • VM Management: Create, manage, and run virtual machines directly from your device.
  6. Overview of UTM capabilities

    main

    UTM is a full-featured emulator and virtual machine host for iOS and macOS based on QEMU. It allows running various operating systems like Windows and Linux on Mac, iPhone, and iPad.

    Key Features:

    • Full System Emulation: Emulates MMU, devices, etc., via QEMU.
    • Processor Support: Supports over 30 architectures, including x86_64, ARM64, and RISC-V.
    • Graphics & Terminal: Supports VGA graphics mode (using SPICE and QXL) and text terminal mode.
    • Peripherals: Supports USB devices.
    • Acceleration: Uses QEMU TCG for JIT-based acceleration.
    • macOS Specifics:
      • Uses Hypervisor.framework and QEMU for hardware virtualization acceleration.
      • Uses Virtualization.framework to run macOS guest operating systems on macOS 12+.
  7. Choose between UTM and UTM SE for iOS

    main

    When using UTM on iOS, you must choose between the standard version and the 'Slow Edition' (SE) based on your device's capabilities and performance needs:

    UTM (Standard)

    • Performance: Uses JIT (Just-In-Time) code generation for maximum performance.
    • Requirements: On iOS, JIT requires a Jailbroken device or specific workarounds/solutions for certain iOS versions.

    UTM SE (Slow Edition)

    • Performance: Uses a thread interpreter which is faster than a traditional interpreter but slower than JIT.
    • Requirements: Does not require Jailbreak or JIT workarounds. It can be installed via standard sideloading.
    • Architecture Support: Optimized for size and compile times by only including ARM, PPC, RISC-V, and x86 (both 32 and 64-bit variants).
  8. Understanding UTM vs UTM SE

    main

    The choice between standard UTM and UTM SE depends on your device and performance requirements, specifically regarding JIT (Just-In-Time) compilation.

    UTM (Standard)

    Requires JIT to maximize performance. On iOS, JIT requires either a jailbroken device or specific system exploits/workarounds to allow dynamic code generation.

    UTM SE ("Slow Edition")

    Designed to run as a standard application without requiring jailbreaking or system exploits. It uses a multi-threaded interpreter instead of JIT. While more compatible and easier to install on iOS, it is slower than the standard version.

    Supported Architectures in UTM SE: To optimize compilation time and app size, UTM SE only supports:

    • ARM (32-bit and 64-bit)
    • PPC (32-bit and 64-bit)
    • RISC-V (32-bit and 64-bit)
    • x86 (32-bit and 64-bit)
  9. macOS Hardware Acceleration Features

    main

    When running UTM on macOS, you can leverage specific hardware acceleration features:

    • Hypervisor.framework: Uses QEMU with hardware-accelerated virtualization.
    • Virtualization.framework: On macOS 12+, you can use this framework to boot macOS guest operating systems.
  10. Understand UTM Graphics Architecture

    main

    UTM's graphics architecture uses multiple translation layers to bridge the Guest's 3D API (like Mesa/OpenGL/Vulkan) to the Host's hardware (Metal).

    GPU Acceleration Path

    When GPU acceleration is active, the flow is:

    1. Guest Userland: Translates API calls to kernel driver commands via virtio-gpu.
    2. Transport: Commands pass through QEMU via the VirtIO interface.
    3. Host Decoding: Libraries like virglrenderer (for OpenGL) or gfxstream (for OpenGL/Vulkan) decode commands.
    4. Host Rendering: Commands are translated via ANGLE (using cgl, eagl, or metal backends) or MoltenVK (Vulkan to Metal) and finally rendered by CocoaSpice using Metal APIs.

    No GPU Acceleration Path

    If acceleration is unavailable, the guest's framebuffer is rendered via pixman (either as an EGL Canvas or Pixel Buffer) and then rendered to the screen by the CocoaSpice Metal Renderer.

  11. macOS-specific virtualization features

    main

    When running on macOS, UTM provides additional hardware-accelerated virtualization options:

    • Hypervisor Framework: Uses Apple's Hypervisor framework and QEMU for hardware acceleration.
    • macOS Virtualization: Can run macOS guests within virtual machines using Apple's Virtualization framework (requires macOS 12 or newer on the host).