File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,12 +148,17 @@ expect {
148148expect "# "
149149
150150# ---- Configure DNS ----
151- # QEMU user-mode networking (SLIRP) always provides a built-in DNS forwarder
152- # at 10.0.2.3, but the Alpine live-boot may leave /etc/resolv.conf empty or
153- # absent, causing all hostname lookups to fail even though IP connectivity
154- # (the default route checked above) is working fine.
151+ # QEMU SLIRP user-mode networking provides a DNS forwarder at 10.0.2.3, but
152+ # that forwarder resolves the HOST's /etc/resolv.conf at runtime. On GitHub
153+ # Actions (Ubuntu), systemd-resolved exposes its stub at 127.0.0.53, and
154+ # some QEMU versions cannot forward to that loopback address, causing every
155+ # DNS lookup inside the VM to return "transient error".
156+ #
157+ # Instead, point the VM directly at a well-known public resolver (8.8.8.8).
158+ # QEMU's SLIRP NAT passes the UDP/53 packets through to the real internet,
159+ # completely bypassing the SLIRP DNS proxy and the host loopback issue.
155160puts "Configuring DNS..."
156- send "echo 'nameserver 10.0.2.3 ' > /etc/resolv.conf\r"
161+ send "printf 'nameserver 8.8.8.8\\nnameserver 1.1.1.1\\n ' > /etc/resolv.conf\r"
157162expect "# "
158163
159164# ---- Install required packages (errors visible; exit on failure) ----
You can’t perform that action at this time.
0 commit comments