utmapp / utmapp/UTM

UTM error “This virtual machine cannot run on the current host machine” does not explain why

Open
#7,749 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
35.5k
Forks
1.8k
Avg merge
5d 5h
Merged PRs (30d)
7

Description

**Describe the issue**

When I start a virtual machine, UTM shows only this generic error dialog:

> **Error**
> This virtual machine cannot run on the current host machine.

The message doesn't say *what* is incompatible or how to fix it. I can't tell whether the problem is the VM image, the CPU architecture, the VM configuration, my Mac, the macOS version, or the virtualization backend — there is nothing actionable in it.

**Actual behavior**

All I get is this dialog with an OK button:

![UTM error dialog: "This virtual machine cannot run on the current host machine." with only an OK button](https://gist.githubusercontent.com/elpinguinofrio/da597bc9c1ac33cfffcbcffbe3c1cfff/raw/utm-error-dialog.png)

**Expected behavior**

The error dialog should explain the specific reason the VM cannot run, such as:

- unsupported CPU architecture
- virtualization vs. emulation mismatch
- unsupported macOS/host version
- missing Hypervisor.framework support
- incompatible VM configuration
- unsupported imported VM setting
- required CPU feature unavailable
- where to find relevant logs

Ideally it would include a short fix suggestion, for example: “Change the VM architecture from x86_64 to ARM64” or “Use Emulate instead of Virtualize.”

Even a “Details…” button that exposes the underlying error / log output would be a big improvement.

**Where the message comes from**

I looked at the source: the dialog text is the single `errorDescription` for the catch-all case `UTMAppleConfigurationError.platformUnsupported`:
https://github.com/utmapp/UTM/blob/fb61bfe86a2cc39bb3bc884636fa55414f317acb/Configuration/UTMAppleConfiguration.swift#L111-L112

That one case is thrown for several unrelated root causes, which is why the dialog can't say anything specific:

| Throw site | Actual root cause |
| --- | --- |
| [`UTMAppleConfigurationSystem.swift#L133-L139`](https://github.com/utmapp/UTM/blob/fb61bfe86a2cc39bb3bc884636fa55414f317acb/Configuration/UTMAppleConfigurationSystem.swift#L133-L139) | macOS guest: host older than macOS 12, **or** the saved `macPlatform` is missing, **or** `vzMacPlatform()` failed (e.g. invalid hardware model / auxiliary storage) — three different causes collapsed into one condition |
| [`UTMAppleConfigurationSystem.swift#L140-L142`](https://github.com/utmapp/UTM/blob/fb61bfe86a2cc39bb3bc884636fa55414f317acb/Configuration/UTMAppleConfigurationSystem.swift#L140-L142) | macOS guest on a non-`arm64` build (Intel hosts can't run macOS guests) |
| [`UTMAppleConfigurationBoot.swift#L65-L70`](https://github.com/utmapp/UTM/blob/fb61bfe86a2cc39bb3bc884636fa55414f317acb/Configuration/UTMAppleConfigurationBoot.swift#L65-L70) | macOS guest requires host macOS 12+ |
| [`UTMAppleConfigurationBoot.swift#L179-L182`](https://github.com/utmapp/UTM/blob/fb61bfe86a2cc39bb3bc884636fa55414f317acb/Configuration/UTMAppleConfigurationBoot.swift#L179-L182) | UEFI boot requires host macOS 13+ |

Splitting `platformUnsupported` into per-cause errors (or adding an associated reason to the case) would let the dialog state the real problem and suggest a fix.

**Configuration**

* UTM Version: the catch-all message is present on current `main` (linked above at commit `fb61bfe`); I can add my exact installed version in a comment if needed
* macOS Version: I can add it in a comment if needed — the dialog text itself is independent of it
* Mac Chip: Apple M4 Pro

**Crash log**

No crash — this report is about the content of the error dialog.

**Debug log**

The dialog appears during pre-start configuration/host validation; I can attach a log if useful.

**Upload VM**

Not specific to one VM — per the code links above, the same dialog appears for several unrelated configurations and host conditions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.