Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Network dropped connection on reset" errors on 9p mounts #4394

Closed
lloeki opened this issue Sep 9, 2022 · 14 comments
Closed

"Network dropped connection on reset" errors on 9p mounts #4394

lloeki opened this issue Sep 9, 2022 · 14 comments
Labels
qemu QEMU related
Milestone

Comments

@lloeki
Copy link

lloeki commented Sep 9, 2022

Simple: add a 9p share to a VM (here I used the Debian Minimal one from UTM, updated to bullseye), mount it, and try to look at things on the host from the VM.

root@debian:~# mount -t 9p -o trans=virtio share /mnt/Users -o version=9p2000.L
root@debian:~# touch /Users/lloeki/foo
root@debian:~# ls -l /Users/lloeki/foo 
root@debian:~# ls -l /mnt/Users/lloeki
ls: /Users/lloeki/foo: Network dropped connection on reset
-rw-r--r-- 1 root root 0 Sep  9 05:21 /Users/lloeki/foo

This has been reported at lima:

This is caused by a errno mapping issue between Darwin and Linux, fixed in QEMU 7.1:

So, I guess the fix is "easy": update to QEMU 7.1 :D

Configuration

  • UTM Version: 4.0.2 (61)
  • macOS Version: 12.5.1 (21G83)
  • Mac Chip (Intel, M1, ...): M1
@osy osy added this to the Future milestone Sep 10, 2022
@osy osy added the qemu QEMU related label Sep 10, 2022
@sbates130272
Copy link

Hmmm I am on QEMU 7.1 and I still see this issue. UTM 4.0.5. Ubuntu 22.04 guest.

@sbates130272
Copy link

An strace inside the guest yields lots of these:

lgetxattr("/mnt/host/zlib-ng", "security.selinux", 0xaaaafc97e8b0, 255) = -1 ENETRESET (Network dropped connection on reset)

@sbates130272
Copy link

@osy can you see if you can replicate this on QEMU 7.1 and then assign as a bug rather than future if the QEMU fix did not resolve this issue (and I do not think it did).

@osy
Copy link
Contributor

osy commented Sep 27, 2022

@sbates130272 I don’t understand why you say you are on QEMU 7.1 and UTM 4.0.5 since UTM 4.0.5 is running the same QEMU 7.0 as 3.x.

@sbates130272
Copy link

@osy OK maybe I am going crazy but I just though UTM used whatever QEMU is available on the path of the host machine. In my case the version of QEMU installed (via homebrew) on my M1 Macbook is 7.1. Am I missing something? I certainly don't see any other qemu-system-aarch64 executables on my system.

batesste@armagh ~ % which qemu-system-aarch64 
/opt/homebrew/bin/qemu-system-aarch64
batesste@armagh ~ % qemu-system-aarch64 --version
QEMU emulator version 7.1.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers

@osy
Copy link
Contributor

osy commented Sep 27, 2022

That’s… that’s not how it works. UTM is based off of QEMU. It doesn’t pull QEMU from your system. It’s built in.

@sbates130272
Copy link

@osy doh. Ooops. Thanks for the clarification. Sorry for being such a noob. So I guess I need to wait for UTM to bump to 7.1 and see if this issue goes away.

@sbates130272
Copy link

@osy sorry to be a pain but where in the codebase does UTM pull in QEMU? I had a look but I can't find anything obvious. I'd appreciate a pointer. Thanks!

@osy
Copy link
Contributor

osy commented Sep 27, 2022

https://github.com/utmapp/UTM/blob/main/Documentation/Dependencies.md

@sbates130272
Copy link

Thanks @osy for helping me out. That all makes much more sense now. Looking forward to the upgrade to 7.1!

@anttiryt
Copy link

this started happening to me after standby/resume from UTM.

@osy osy modified the milestones: Future, v4.1 Nov 23, 2022
@lelegard
Copy link

Hi,

Could you please tell when UTM 4.1 will be released? I have the same issue and wait for a fix.

Alternatively, could anyone indicate how to modify the qemu command line which is generated by UTM to use qemu 7.1.0, as installed by Homebrew?

I tried without luck.

  • Using QEMU / Export command from UTM, the generated command starts with qemu-system-aarch64 -L /Applications/UTM.app/Contents/Resources/qemu ...
  • The default qemu-system-aarch64 is the one from Homebrew (7.1.0). When I try to run the command, it says qemu-system-aarch64: -spice: invalid option
  • Using ps, I see that the actual process is /Applications/UTM.app/Contents/XPCServices/QEMUHelper.xpc/Contents/MacOS/QEMULauncher.app/Contents/MacOS/QEMULauncher /Applications/UTM.app/Contents/Frameworks/qemu-aarch64-softmmu.framework/Versions/A/qemu-aarch64-softmmu instead of qemu-system-aarch64. So, I tried it but it failed immediately with Trace/BPT trap: 5.
  • Using htop, I see that QEMULauncher is in fact a child process of QEMUHelper. But the latter has no command line argument and must have been created using some specific configuration. If I try to run it, I get An XPC Service cannot be run directly.

So, is there a simple way to tweak the UTM-generated qemu command using another instance of qemu, namely the version 7.1.0 which is installed with Homebrew?

@osy
Copy link
Contributor

osy commented Dec 14, 2022

https://github.com/utmapp/UTM/releases Please check out 4.1.1 beta. QEMU has been updated.

@osy osy closed this as completed Dec 14, 2022
@lelegard
Copy link

ttps://github.com/utmapp/UTM/releases Please check out 4.1.1 beta. QEMU has been updated.

Thanks, works great, no more "network dropped" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qemu QEMU related
Projects
None yet
Development

No branches or pull requests

5 participants