Sunday, October 11, 2009

My Guest OS cannot ping My Host OS in Virtual Box

The default networking setup for VirtualBox is NAT, which means basically that your host computer is acting like a router, creating a virtual network for your virtual machine to connect to. Naturally, this network has it's own IP scheme.

I have a router(gateway) (
host computer

I was trying to manually set up my guest to static ip and found it cannot ping my gateway, neither can access internet.
By default the ip of guest is, it can access internet and my router(

To fix the issue, I had to use Bridge Network.
1) Virtual Box -> SETTINGS -> NETWORK -> Bridge -> Edit Setting -> Add your active adapter for internet/network (in my case I am using Wireless Adapter en1: AirPort of my MacBook )

2) Then I started my guest OS. Say I have Windows XP as my guest OS. I need to edit the network settings. Manually add the IP ADD, DEFAULT GATEWAY, DNS. Since my router act as DNS for my LAN, I used DNS same as my DEFAULT GATEWAY.