I'm a beginner in networking and try to setup multiple Ubuntu VMs on VirtualBox for the learning purpose.
For the multi-node Hadoop cluster setup,
I installed VirtualBox in my laptop and installed Ubuntu guest VM. Then i cloned the Ubuntu VM as another VM. Then, I modified Network of both VMs by adding adapter# 2 with Host-only option and also enabled the DHCP Server option under Host-only networks in the VirtualBox manager Preferences.
Then, I started both Ubuntu VM and updated below things on both VMs.
For First VM,
sudo gedit /erc/network/interfaces
Added the below lines and saved,
auto eth1
iface eth1 inet static
address 192.168.56.101 <--- Used 192.168.56.102 for 2nd VM
netmask 255.255.255.0
sudo gedit /etc/hosts
Added the below lines after the line 127.0.0.1 localhost and deleted the line 127.0.1.1 my-laptop,
192.168.56.101 Node1
192.168.56.102 Node2
sudo gedit /etc/hostnale
-- Updated the correct host name.
After these changes, I rebooted both VMs, internet is not working on both and not able to do SSH also. Please advise on this issue. I want to setup two Ubuntu VMs with static ip address and internet connectivity and need to do SSH between them.