I have created a new VM in RedHat (CentOS 7) in the Virtual Box on my Mac. But it is not able to connect to the network.
When you try to ping google.com.hk, the unknown host error is returned.
But you can ping 188.8.131.52 successfully.
Go to Devices > Network > Network Setting
Select “Bridged Adapter” for “Attached to”. Click “OK”
Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 (the file name might be different but in the format of ifcfg-exxxx)
DEVICE=eth0 (no change) HWADDR=11:22:33:44:55::66 (no change) BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.50 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=184.108.40.206 DNS2=192.168.1.1
Run the following command:
# service network restart
Additional Note: Someone can run the following command to make it for enabling network connection
dhclient -v eth0