Installing RedHat CRC in a CentOS VM – Troubleshooting CRC DNS
Network Manager is a requirement from CRC for handling network. After installing CentOS install Network Manager.
yum install NetworkManager
To see if NetworkManager is able to handle the interfaces the cli can be used:
Configure and install dnsmasq.
yum install dnsmasq
Edit dnsmasq configuration at
It should include the following parameters:
server=126.96.36.199 user=dnsmasq group=dnsmasq listen-address=127.0.0.1,::1,192.168.0.221 conf-dir=/etc/dnsmasq.d,.rpmnew,.rpmsave,.rpmorig
The listen-address line makes dnsmasq listen on that IP address. The last one 192.168.0.221 is the IP address of my CentOS VM. As DNS server 188.8.131.52 is going to be used. That’s Google, so put one you like or trust more.
Enable the service, start it and check its status:
systemctl enable dnsmasq systemctl start dnsmasq systemctl status dnsmasq
In case CRC cannot start because of a DNS issue: check that NetworkManager and dnsmasq are both working. I had the case that NetworkManager started its embedded dnsmasq and that did not work. I had to enable dnsmasq as a normal service and then deactivate the embedded one in NetworkManager.
/etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf [main] # dns=dnsmasq
Check that the firewall allows connection for dns / dhcp
firewall-cmd --add-service=dns --permanent firewall-cmd --add-service=dhcp --permanent firewall-cmd --reload