qemu can't resolve ::1 when no network is available
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
I'm not sure if this is a qemu thing or a getaddrinfo/glibc thing, or
even just something about my laptop. However we have a test failure
in nbdkit which only occurs when my laptop is not connected to wifi or
other networking. It boils down to:
$ qemu-img info --image-opts "file.driver=
qemu-img: Could not open 'file.driver=
In a successful case it should connect to a local NBD server on port
1234, but if you don't have that you will see:
qemu-img: Could not open 'file.driver=
I can ‘ping6 ::1’ fine.
It also works if I replace ‘::1’ with ‘localhost6’.
My /etc/hosts contains:
127.0.0.1 localhost localhost.
::1 localhost localhost.
ping6 output when the network is not connected:
$ ping6 ::1 087/0.092/ 0.011 ms
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.082 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.092 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.089 ms
^C
--- ::1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 55ms
rtt min/avg/max/mdev = 0.082/0.