Skip to content

Apple Virtualization: only update shared directories if they changed to avoid unnecessary virtiofs reconnections#7494

Merged
osy merged 1 commit into
mainfrom
unknown repository
Jan 3, 2026
Merged

Apple Virtualization: only update shared directories if they changed to avoid unnecessary virtiofs reconnections#7494
osy merged 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Nov 21, 2025

Copy link
Copy Markdown

For Apple Virtualization, only update shared directories if they changed to avoid unnecessary virtiofs reconnections.

Although this issue existed prior to v4.5.4, following v4.5.4, UTM introduced dynamic resolution. Resizing the window with dynamic resolution is a repeatable way to cause a registry update. updateConfigFromRegistry() updates the shared directories on every call, causing the virtiofs to reconnect. As the virtiofs disconnects and reconnects, file and directory handles on the share are invalidated causing guest application errors.

To reproduce bug:

  • Apple Virtualization, Linux guest, Dynamic resolution enabled
  • Open terminal
  • $ cd {shared_directory}
  • Resize the window
  • $ ls
  • Result: ls: cannot open directory '.': No such file or directory

Thank you to @kraju for the hint that the issue started in v4.5.4.

…to avoid unnecessary virtiofs reconnections

For Apple Virtualization, only update shared directories if they changed to avoid unnecessary virtiofs reconnections.

Although this issue existed prior to v4.5.4, following v4.5.4, UTM introduced dynamic resolution.  Resizing
the window with dynamic resolution is one repeatable way to cause a registry update.  updateConfigFromRegistry()
updates the shared directories on every call, causing the virtiofs to reconnect.  As the virtiofs disconnects
and reconnects, file and directory handles on the share are invalidated causing guest application errors.

To reproduce bug:
- Apple Virtualization, Linux guest, Dynamic resolution enabled
- Open terminal
- $ cd {shared_directory}
- Resize the window
- $ ls
- Result: ls: cannot open directory '.': No such file or directory
@ghost

ghost commented Nov 21, 2025

Copy link
Copy Markdown
Author

Fixes #7488

@osy osy linked an issue Jan 3, 2026 that may be closed by this pull request
@osy osy merged commit 7346ba9 into utmapp:main Jan 3, 2026
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.

Linux guest disconnects virtiofs frequently

1 participant