blob: f5a83c91181a3628c796e398ec835b02bc26ec02 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
qemu can't resolve ::1 when no network is available
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=nbd,file.host=::1,file.port=1234"
qemu-img: Could not open 'file.driver=nbd,file.host=::1,file.port=1234': addre
ss resolution failed for ::1:1234: Address family for hostname not supported
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=nbd,file.host=::1,file.port=1234': Faile
d to connect socket: Connection refused
I can ‘ping6 ::1’ fine.
It also works if I replace ‘::1’ with ‘localhost6’.
My /etc/hosts contains:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
|