When I execute command 'ping google.com' the output is 'ping: unknown host google.com'.
Now I will share the steps on how to enable the internet connection in virtulabox.
Hope it helps...
1. Right click the installed CentOs in virtualbox and select settings. In next window select Network then just copy setting like in image below.