UTM
UTM copied to clipboard
Apple Virtualization: only update shared directories if they changed 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 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.
Fixes #7488