You are not logged in.

#1 2021-03-20 01:54:04

zeroxoneafour
Member
Registered: 2021-03-20
Posts: 25

[fixed] pacman sync in virt-manager - Could not resolve host

I installed Arch on a virtual disk using virt-manager to try it out (on my real machine, I have Manjaro). The setup worked and it could download and install all of the necessary files. I got grub working and booted into it, and made a user account and everything. But when I tried to run pacman -Syu, it said error: failed retrieving file 'community.db' from <a mirror> : could not resolve host: <mirror>
I know it's not directly a problem with the virtual machine, because when I booted from the installation medium and chrooted into the installation, I ran pacman -Syu and it worked. I have tried deleting and editing /etc/resolv.conf. I have also tried toggling on and off systemd-resolved.service. /etc/resolv.conf seems to not be changing after reboots, but systemd-resolved.service is toggled on after a reboot, regardless of previous state.

Output of ping google.com with systemd-resolved.service enabled:
ping: google.com: Name or service not known

Output of ping.google.com with systemd-resolved.service disabled:
ping: google.com: Temporary failure in name resolution

Contents of /etc/resolv.conf
search domain.name
nameserver 192.168.50.1
nameserver 8.8.8.8
nameserver 1.1.1.1
nameserver 1.0.0.1

Output of ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp8s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
       link/ether 52:54:00:dd:14:99 brd ff:ff:ff:ff:ff:ff

Last edited by zeroxoneafour (2021-03-21 22:23:40)

Offline

#2 2021-03-20 02:04:40

ponyrider
Member
Registered: 2014-11-18
Posts: 112

Re: [fixed] pacman sync in virt-manager - Could not resolve host

2: enp8s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

your ethernet is DOWN

Offline

#3 2021-03-20 02:10:18

zeroxoneafour
Member
Registered: 2021-03-20
Posts: 25

Re: [fixed] pacman sync in virt-manager - Could not resolve host

ponyrider wrote:

2: enp8s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

your ethernet is DOWN

Ran sudo ip link set up enp8s0, same errors under the same conditions

Offline

#4 2021-03-20 03:15:50

zeroxoneafour
Member
Registered: 2021-03-20
Posts: 25

Re: [fixed] pacman sync in virt-manager - Could not resolve host

Inexplicably, it started working again. What I did was -
Installed all of the resolvconf configuration tools
Installed dhcpcd
Enabled enp8s0 (some credit to ponyrider there)
sudo rm /etc/resolv.conf
Enabled dhcpcd as a system service
And rebooted. Just to test, I tried ping google.com out of hope (before the reboot, it pinged but it hung on response) and it worked!

Offline

#5 2021-03-20 07:39:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: [fixed] pacman sync in virt-manager - Could not resolve host

Sanity check:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Also please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB