How to Ping from host computer to Virtual machine in Oracle VM VirtualBox? Here I will show you how to make use of VirtualBox host only Ethernet network adapter for communicating between Virtual PC and Host computer. Host-only networking is another networking approach in virtual box network. With bridged networking, the virtual machines can communicate internet through a physical Ethernet. But host only network adapter meant for internal networking and testing however, a physical networking interface need not be present.
Virtual PC is essential for any Network administrators for exploring and testing network issues. Here let’s see How to set Static IP to VirtualBox host only network card and ping between Host and Virtual PC.
Before going to the technical description let me explain my environment.
Host : Windows 7
Virtual PC : Windows Server 2012 on Oracle VM VirtualBox
Problem : I want to Ping between my Windows 7 computer and Virtual Windows Server 2012. After installing Windows Server 2012 in VirtualBox I was unable to ping from my host PC to Virtual computer.
Let’s Begin Host only network
As the name indicating there is only Host for networking. This adapter will connect Virtual PC and Host only. No outside connection (Internet, or Other network).
Open Network and Sharing center >> Adapter Settings in host computer (Windows 7) and look for VirtualBox Host-Only Network adapter
Right click and take Properties,
Double click on Internet Protocol Version 4.
Put a Static IP. Here I used Class B IP address with default subnet mask. No need of preferred DNS server.
[Read More: IP Address, Classes and Subnet Mask]
Now come to Virtual Box, take Settings and then Network. Select Host-Only Adapter from Attached to drop down menu. That’s all click OK
Run Virtual PC and go to Network Adapter settings,
Also assign a Static IP address in the same range that you assigned to the host before. No need of preferred DNS server.
Open command prompt then try ping to host and vice versa. Refer the screen shots below.
My Host (Windows 7) Static IP : 172.16.1.50
Virtual PC (Windows Server 2012) Static IP : 172.16.1.51