The 23rd of April "alex" posted a message to the Dutch Linux Usenet group nl.comp.os.linux.installatie with the subject "Install Hypervm " centos". In the message "alex" asked for help since he couldn't make it work. Since I had installed CentOS in Microsoft Hyper-V several times the past year I replied to his message if he could provide some more information I might be able to help. Instead of replying back to me on Usenet "alex" emailed me with more information from which I concluded that resolving domain names in his CentOS installation running inside Microsoft Hyper-V was not working.
Since I have been very busy last week I didn't have time to look up the file with notes I made last year when I did several CentOS installations in Hyper-V for a customer of mine. Today, when sorting out my email in Thunderbird I decided to finally reply to the email in which he had explained that using ping with an IP address worked, but ping with a domain name not.
I guessed that "alex" had forgotten to add one or more DNS
servers to the
resolv.conf file residing in the
etc directory, so in my reply I wrote to use
vi to edit
/etc/resolv.conf and make
the file look as follows:
search localdomain nameserver 220.127.116.11 nameserver 18.104.22.168
The public domain name servers I used above are provided by Level 3 Communications. In my email, however, I wrote incorrectly that the domain name servers belong to Google..
After this modification, which has to be done with sufficient (root) rights the network needs to be restarted, again with sufficient (root) rights as follows:
After which the following command should give a result:
ping -c1 google.com
-c1 option causes the ping command to do
stop after it has sent one ECHO_REQUEST packet.
Further I recommended "alex" that if he has the IP address of
the domain name server (or servers) of his provider he might
want to put that one first after
If you prefer to use Google Public DNS use the following
search localdomain nameserver 22.214.171.124 nameserver 126.96.36.199
And if you prefer to use OpenDNS use the following
search localdomain nameserver 188.8.131.52 nameserver 184.108.40.206
Don't forget to restart the network after you have made changes