You are not logged in.
Hi, I am trying to install Arch Linux on Hyper-V Virtual Machine. My host machine has all incoming connections blocked by default, so internet doesn't work in archiso. I usually fix this on linux (previously I used WSL Debian) by changing dns server to google dns 8.8.8.8 using /etc/resolv.conf. But in this case of Arch Linux (or any linux distro) this fix does not work unless archiso is booted with incoming connections allowed. Although I do not know much about linux, here are some interesting findings.
The output of ip route is empty.
Output of ip addr:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:fc:61:04 brd ff:ff:ff:ff:ff:ff
inet6 fe80::215:5dff:fefc:6104/64 scope link
valid_lft forever preferred_lft forever
The output of ip route is:
default via 172.19.16.1 dev eth0 proto dhcp src 172.19.25.176 metric 512
172.19.16.0/20 dev eth0 proto kernel scope link src 172.19.25.176
172.19.16.1 dev eth0 proto dhcp scope link src 172.19.25.176 metric 512
The output of ip addr is:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:fc:61:04 brd ff:ff:ff:ff:ff:ff
inet 172.19.25.176/20 brd 172.19.31.255 scope global dynamic eth0
valid_lft 85773sec preferred_lft 85773sec
inet6 fe80::215:5dff:fefc:6104/64 scope link
valid_lft forever preferred_lft forever
Here 172.19.16.1 is the IP address of Hyper-V Ethernet Adapter and 172.19.25.176 is IP address that I can use to SSH to VM (not possible in first scenario). Maybe if IP addresses on Linux guest are set manually it is possible to fix the problem but I'm not sure how to do it. That said I still don't know if it is the correct solution.
Last edited by crimsoncandy (2021-04-18 12:06:03)
Offline
I found that doing
ip addr add 172.19.25.176/20 dev eth0
and
ip route add default via 172.19.16.1 dev eth0 proto dhcp src 172.19.25.176
make internet work. But I'm still looking for better solution and to make changes permanent in final install.
Offline
It seems that the host does not provide any IP address to the guest via dhcp, possibly because incoming requests are blocked. Try unblocking connections from the guest or configure systemd-networkd to use a static address if you prefer that.
Last edited by tucuxi (2021-04-18 10:03:24)
Offline
I am going to point you at https://wiki.archlinux.org/index.php/Ne … figuration
I found the systemd-nwtwork to work well for me. It can easily configure static IP addresses and routes for you and start them as a system service.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline