I am trying to setup a 2-node Hadoop cluster (following this guide), where the master is going to be my Ubuntu laptop and the slave a virtualbox running ubuntu.I also read about networking in virtualbox, but I still have issues.However, both have the same IP address and I now, in the master node, I have this /etc/hosts file:127.0.0.1   localhost127.0.1.1   gsamaras127.0.1.1   master127.0.1.1   slave-1This seems messed-up to me, thus I would like to give virtualbox's Ubuntu another IP. I did check this question Change IP address of a Virtual Machine running linux ubuntu on windows 8?, but what the answer proposed is not found in the virtualbox. What I have selected there is:Devices -> Network -> Bridged Adapter (name wlan0)with the default to be NAT. However the /etc/hosts file there has the same IP. I also did that for a new Ubuntu I created in virtualbox, before doing the Installation process of Ubuntu, but its /etc/hosts, is the same as the other Ubuntu in virtualbox, i.e.:127.0.0.1   localhost127.0.1.1   gsamaras-VirtualBox127.0.1.1   master127.0.1.1   slave-1How to make the virtualbox's Ubuntu and my Ubuntu to have different IPs?EDIT:On master node (i.e. my laptop)hadoopuser@gsamaras:/home$ /sbin/ifconfig -aeth0      Link encap:Ethernet  HWaddr e8:40:f2:d8:76:ca            UP BROADCAST MULTICAST  MTU:1500  Metric:1          RX packets:0 errors:0 dropped:0 overruns:0 frame:0          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)lo        Link encap:Local Loopback            inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:38796 errors:0 dropped:0 overruns:0 frame:0          TX packets:38796 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0           RX bytes:6705515 (6.7 MB)  TX bytes:6705515 (6.7 MB)wlan0     Link encap:Ethernet  HWaddr 00:08:ca:bd:cf:22            inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0          inet6 addr: fe80::208:caff:febd:cf22/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:654899 errors:0 dropped:0 overruns:0 frame:0          TX packets:442294 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:746284872 (746.2 MB)  TX bytes:121215609 (121.2 MB)and on the slave node (i.e. the virtualbox):gsamaras@gsamaras-VirtualBox:~$ /sbin/ifconfig -aeth0      Link encap:Ethernet  HWaddr 08:00:27:a3:40:f1            inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0          inet6 addr: fe80::a00:27ff:fea3:40f1/64 Scope:Link          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1          RX packets:42 errors:0 dropped:0 overruns:0 frame:0          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:4748 (4.7 KB)  TX bytes:10743 (10.7 KB)lo        Link encap:Local Loopback            inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:172 errors:0 dropped:0 overruns:0 frame:0          TX packets:172 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:0           RX bytes:12500 (12.5 KB)  TX bytes:12500 (12.5 KB)EDIT_1:From the master node I did (while the virtualbox's network is set to Bridged Adapter with the name wlan0):gsamaras@gsamaras:~$ ssh 192.168.1.5ssh: connect to host 192.168.1.5 port 22: No route to hostgsamaras@gsamaras:~$ ssh 192.168.1.2The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.ECDSA key fingerprint is 78:21:77:e8:aa:c5:c5:41:8f:32:56:f7:c6:37:fc:a2.Are you sure you want to continue connecting (yes/no)? noHost key verification failed.gsamaras@gsamaras:~$ ping 192.168.1.5PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.From 192.168.1.2 icmp_seq=1 Destination Host Unreachable...
Make virtualbox get a different IP address than my laptop
networking;virtualbox;ip;cluster;hadoop
It looks like you are using bridged networking and your host and guest already have different IP addresses, 192.168.1.2 for the host (what you call master node) and 192.168.1.5 for the guest (slave node).Don't be confused by addresses in the 127.x.x.x network. These are loopback addresses and they never leave the TCP/IP stack, i.e. two different machines (whether real or virtual) cannot communicate together through them.