UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Linux guest disconnects virtiofs frequently

Open evan314159 opened this issue 2 months ago • 2 comments

Describe the issue
Linux guest (Debian Trixie, Fedora) virtiofs disconnects and reconnects for no obvious reason. Files open on the virtiofs at the time have errors, and if the current working directory is on the virtiofs its handle is also invalid:

ls: cannot open directory '.': No such file or directory

When I notice the VM in this state I can restart apps or change directory to the present working directory, and then it will be fine until the next time.

Configuration

  • UTM Version: 4.7.4, Apple Virtualisation
  • macOS Version: 26.1
  • Mac Chip (Intel, M1, ...): M4 Pro

Crash log
None

Debug log
I do not see anything logged in the guest OS -- no dmesg or journalctl I don not see anything logged on the host -- no Console.app output for "virtiofs" or UTM errors

Upload VM
It is reproducible across different Linux distributions, macOS versions, hardware It is reproducible but not on demand. I don't know the conditions that cause this to happen, but it happens anywhere between multiple times daily to after a few days. For example it has happened twice this morning.

evan314159 avatar Nov 16 '25 00:11 evan314159

I have exactly the same on M2 Pro with Ubuntu 24.04 and Debian 13 running with Apple Virtualization on macOS Sonoma, Sequoia and currently Tahoe. Tried multiple kernels, but it turned out it was UTM-related for me - last working version is UTM 4.5.4 - since then virtiofs shares are reconnected after some time (I found this due to my bind mounts from virtiofs mounts were invalidated after some time). There are no messages, no errors, just virtiofs underneath seems to be updated.

kraju avatar Nov 20 '25 10:11 kraju

@kraju thank you for the hint that the issue started in v4.5.4, which introduced dynamic resolution. From that I found a repeatable way to cause the issue: resize the window, which post-4.5.4 causes a registry update that reconnected the virtiofs.

PR: #7494. Thank you!

evan314159 avatar Nov 21 '25 19:11 evan314159