I'm running VirtualBox 4.2 on Windows Server 2003 and I am trying to ping the IP address of the guest virtual machine from the Windows host (ICMP is not being blocked).
The guest is 192.168.0.1 and the host is on a different subnet, 192.168.1.100. The virtual machine's networking settings looked like this:
and the host network config looked like this:
I added a secondary IP address of 192.168.0.2 to the host NIC shown in the screenshot above and was unable to ping 192.168.0.1 from the host. I found it odd that the "VirtualBox Bridged Networking Driver" checkbox was unchecked (this was the default following VirtualBox install), so I checked it, and had the same problem.
As a test I then changed the guest's network settings use the host-only adapter, as shown below:
and on the host I edited the "VirtualBox Host-Only Network" adapter's settings to have an IP address on the 192.168.0.x segment as follows:
but was still unable to ping. Note: If I change the primary address of the host's network adapter to be on the 192.168.0.x segment than I am able to ping the 192.168.0.1 guest. But I still need the host to be on it's original network.
Thoughts?
So you are bridging the VM NIC with a 192.168.0.x ip to a LAN which runs 192.168.1.* ?
That ain't going to work of course.
When you bridge the VM NIC works "in parallel" to the hosts NIC on the same LAN.
That means that BOTH machines (host and guest) are in the SAME subnet and should use an ip-address in that range.
You can make it work with different ip-ranges, but you will have to re-configure the router in that case. It must have an ip-address in each subnet and route between the 2 L3 subnets on the same L2 LAN.
And both machines need to use that router (the routers ip-address for their own subnet) as their default gateway.
Please note that super-imposing 2 subnets on the same L2 LAN may cause some undesired side-effects. A lot of equipment won't like it. It may also cause some issues with your DHCP server (e.g. if it is a Microsoft DHCP server the superscope needs to be setup correctly).
Try adding a route on the Windows host in order to use the correct source IP (i. e. the IP from the same subnet the VM is in):
If you're going to use bridged networking, you need to treat the guest exactly the same as a physical computer on your network, i.e. it needs to have an IP address on the same subnet.