In order to ping connect host to guest, we need to add new network adapter, set it Bridged interface, and assign it an static IP address.
In this tutorial, my host runs Mac OSX and guest runs on Ubuntu server.
1. Check host’s network information with ifconfig
2. Add new Network Adapter to guest
Shutdown the host and add a new network adapter. Configure it like bellow picture:
3. Assign a static IP address to new adapter
Open /etc/network/interfaces file and append these red lines. Make sure that the static IP is same range with your host’s IP.
4. Restart network and guest by these command
sudo /etc/init.d/networking restart
sudo shutdown -r now