Skip to content

Add warning when port forwards are used in bridged/shared mode#7705

Open
mstrofnone wants to merge 1 commit intoutmapp:mainfrom
mstrofnone:feature/port-forward-warning
Open

Add warning when port forwards are used in bridged/shared mode#7705
mstrofnone wants to merge 1 commit intoutmapp:mainfrom
mstrofnone:feature/port-forward-warning

Conversation

@mstrofnone
Copy link
Copy Markdown

Changes

This PR adds an inline warning note in the network configuration view that appears when the user selects 'Bridged' or 'Shared' network mode.

Problem

UTM's UI lets users add PortForward entries to a Bridged or Shared network adapter, but those forwards are silently ignored by the QEMU command-line generator because Apple's vmnet framework doesn't support hostfwd=. Users discover this empirically — port forwards just don't work, no warning given.

Solution

Added a note (in orange, using the footnote font) that appears only when network mode is Bridged or Shared, stating that port forwards are only honored in Emulated mode due to vmnet framework limitations.

The change is in Platform/Shared/VMConfigNetworkView.swift and only affects macOS (wrapped in #if os(macOS)).

Testing

  • Open UTM on macOS
  • Create or edit a VM's network configuration
  • Select 'Bridged (Advanced)' or 'Shared Network' mode
  • Observe the orange note appearing below the network mode selection
  • Port forwards UI should still be visible (for user's reference if they switch modes)

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.

1 participant