User mode networking not working properly on QEMU on Mac OS X host because of libslirp
Steps to reproduce:
homebrewon Mac OS X (I tried on Catalina and Big Sur)
- Spin up a guest VM (say) Cent OS 8 using user mode networking.
podmaninside the guest
podman pull alpine
The result is:
[root@localhost ~]# podman pull alpine Resolved "alpine" as an alias (/etc/containers/registries.conf.d/shortnames.conf) Trying to pull docker.io/library/alpine:latest... Getting image source signatures Copying blob ba3557a56b15 [======================================] 2.7MiB / 2.7MiB unexpected EOF Error: Error writing blob: error storing blob to file "/var/tmp/storage851171596/1": error happened during read: unexpected EOF
This is happening because QEMU is telling the guest that the TCP connection is closed even before reading all the data from the host socket and forwarding it to the guest.
This issue doesn't happen on a Linux host. So, that tells me that this has something to do with QEMU installation on Mac OS X.
Since QEMU uses
libslirp underneath for its networking, this is more likely to a
libslirp issue. QEMU/slirp teams may need to work together on fixing this. Here's the link to the corresponding bug on QEMU bug tracker.