UTM: Ubuntu Server 20.04 VM networking stops working intermittently
Describe the issue I’m running a Ubuntu Server 20.04 VM according to the setup guide.
Every so often, the VM networking stops working while it is running. The VM can no longer access the internet, and I can no longer SSH from the host to the VM. The VM console window still works, and I’m able to log in and use the VM that way. I can shut down and restart the VM, and networking works again.
I’ve noticed that when networking stops working, the CPU usage for QEMULauncher sits at 100%. Nothing inside the VM (checked with htop) is using this much CPU.
It happens randomly - I can’t reproduce it on demand. I’ve been running this VM daily for a couple of weeks, and I’ve seen this issue ~5 times. Once it happened twice (after a restart) within about 5 minutes.
Configuration
- UTM Version: 2.4.1
- OS Version: macOS Monterey 12.0.1
- Intel or Apple Silicon? Apple (M1 Max)
- Shared networking
Crash log N/A
Debug log Will add ASAP - sorry, I enabled debug logging earlier, but have since restarted the VM. I’ll wait for the issue to happen again and attach the debug log.
Upload VM config.plist.txt
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 2
- Comments: 28
I was able to restore networking by running this in the console window:
I ended up creating this script that periodically checks if the internet is up, and if not, automatically restarts the interface, based on the solution in this issue.
Notes:
enp0s1to the name of the interface you’re using. To check the name runip linkThis works for me and needs to be done after every reboot: dhclient enp0s1
Hi all,
This issue is vey easy to reproduce on latest opensuse leap + sharing a big file (over 10 GB) via ssh. It is freezing every time. I can provide logs if necessary.
Wysłane z iPhone’a
I’ve been encountering the same issue, and the fix by @tallytarik works to fix it at least temporarily.
Just upgraded to Monterey 12.1 and ran into the same issue. Headless (console) Linux VM Guest.
By the look of things it’s initially getting APIPA / ULA addresses:
DHCP bug maybe?Seems to be dependent on firewall. Previously on Big Sur I was running “Drop all incoming connections”, later went down to turning on stealth mode, neither seemed to interrupt UTM. Now it appears that having the firewall enabled at all (even setting UTM.app and QEMULauncher.app to “Allow incoming connections” doesn’t help) seems to break DHCP.Setting the IP manually (to what DHCP would normally provide) seems to work, although that might be coincidental;
Relatively tame firewall settings that feel like they shouldn’t be causing issue, perhaps something up with the vmnet-mac qemu driver?