Xiabo:
It’s entirely possible to change the HDP Sandbox configuration on VirtualBox from NAT networking to host-only networking. That can be done with the following procedure:
* Stop the VM if it is running
* Right-click on the VM, go to Settings > Network > Adapter 1
* Select Host-Only; click OK to save your settings
* Start the VM
If you do make that change, it will require some changes in the way you access the various services on the guest VM, and thus the way that to ssh to the guest VM, and access the various services running on the gues. For example, on my laptop, the guest VM network adapter obtains an IP address of 192.168.56.101, so to access the common services, I did the following
* SSH from my host machine becomes
# ssh root@192.168.56.101
* Browsing to HUE becomes
* Browsing to Ambari, if it’s enabled becomes
And so forth. The IP number for your specific guest may be different, so adjust your commands and URLs accordingly.
If you’re unsure what IP is assigned, you can login via the VirtualBox console window, (user: root, password: hadoop), and run the following command:
# ifconfig eth0
This will print some output similar to the following. Use the IP address shown:
[root@sandbox ~]# ifconfig eth0 | grep “inet addr”
inet addr:192.168.56.101 Bcast:192.168.56.255 Mask:255.255.255.0
Best wishes, and happy hadooping,
Bryce