Skip to content

qemu: fail early when vmnet networking is not entitled - #8045

Merged
osy merged 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/unsigned-networking
Nov 12, 2026
Merged

osy merged 1 commit into
utmapp:mainfrom
UTMapp-bot:fix/unsigned-networking

Conversation

@UTMapp-bot

Copy link
Copy Markdown
Collaborator

A UTM built without the VM entitlement profiles (ad-hoc signed, which is what a checkout without CodeSigning.xcconfig builds) has no com.apple.vm.networking. Starting a VM with a Shared Network interface (the default for new VMs) then failed in QEMU with "cannot create vmnet interface", which does not say what to change.

UTM now reports whether QEMULauncher, the process that opens vmnet and is signed separately from UTM, has the entitlement as a capability, read from its code signature. Starting a VM with a Shared Network, Host Only or Bridged interface without it fails before QEMU starts, with an error that names the entitlement and the fix. Which modes use vmnet is now decided in one place (UTMQemuConfigurationNetwork.isVmnet), shared with the QEMU arguments. New VMs still default to Shared Network so creation behavior does not depend on how UTM was signed.

Testing: Tested by a human on macOS 27.2, MacBook Pro (Apple M2 Max).

  • QEMULauncher signed with QEMULauncher-unsigned.entitlements: a Shared Network VM and a Host Only VM fail to start with "This build of UTM does not have the entitlement for Shared Network, Host Only or Bridged networking. Change the network mode to Emulated VLAN." and QEMU is not launched; after switching to Emulated VLAN the VM starts (-netdev user).
  • Signed build: a Shared Network VM starts as before (-netdev vmnet-shared).

The author acknowledges that this change has been tested and/or reviewed by a human in accordance with UTM's AI contribution guidelines.

A UTM built without the VM entitlement profiles (ad-hoc signed, which is
what a checkout without CodeSigning.xcconfig builds) has no
com.apple.vm.networking. Starting a VM with a Shared Network interface
(the default for new VMs) then failed in QEMU with "cannot create vmnet
interface", which does not say what to change.

UTM now reports whether QEMULauncher, the process that opens vmnet and is
signed separately from UTM, has the entitlement as a capability, read from
its code signature. Starting a VM with a Shared Network, Host Only or
Bridged interface without it fails before QEMU starts, with an error that
names the entitlement and the fix. Which modes use vmnet is now decided in
one place, shared with the QEMU arguments. New VMs still default to Shared
Network so creation behavior does not depend on how UTM was signed.

To test: build without CodeSigning.xcconfig. A VM with Shared Network
fails to start with "This build of UTM does not have the entitlement for
Shared Network, Host Only or Bridged networking. Change the network mode
to Emulated VLAN." After changing it to Emulated VLAN it starts. A signed
build starts the Shared Network VM as before.

Assisted-by: Claude:claude-opus-5-5
@osy
osy force-pushed the fix/unsigned-networking branch from 5d70852 to 32d224f Compare November 12, 2026 03:52
@osy
osy merged commit de8b38c into utmapp:main Nov 12, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants