I was having a Internet connection problem on my virtual machine. So If you are in same situation this blog post might be helpful to you.
FYI: I am using Oracle VM VirtualBox Manager and OS is windows server 2008.
Step 1: Check Oracle VirtualBox settings. Click on Network link and check whether attached to is NAT.
Step 2: Click on Network icon from "System tray" and click on "Network and Sharing center".
Step 3: On "Network and Sharing center" window, you will find "Tasks" on left side. Click on "Diagnose and repair" link. This will automatically repair your local area connection with parent machine and in turn your Internet access will back on again.