1) Change your network adapter to a Bridged Adaptor:

1.jpg


2.jpg3.jpg

2) Run your Hadoop VM (by double clicking it in the left sidebar)

Now on your main VirtualBox Manager (similar to the first figure), double click on the Hadoop in order to run the Hadoop VM. After the booting process is complete (it may take a few minutes), you will see a window similar to the picture below (if Terminal is not open, simply go to the applications -> system tools -> Terminal):

 

4.jpg

3) In the terminal of your virtual machine type this at the prompt:5.jpg

You should see output lines like the ones in the purple boxes:

5b.jpg

Note this ip address "10.10.1.146" - it might be different every time, so check it before you want to connect.

4) To connect with ssh:

From your terminal program (on Mac) or putty program (on Windows), run this:

6.jpg

Using the ip address you got before. When you are prompted for a password, it's "training".

Once you are logged in you can use all the usual command as in the VM window, but now you should be able to cut and paste.

7.png.jpg

If you are not prompted for a password, then maybe you cannot connect. First just make sure you spelled "training" correctly and have the right digits. You can try this with the IP address you are using:8.png.jpg

and hit Control-C after a few lines of output. If you see a comment that you have "100.0% packet loss" then these techniques won't work right now.

9.png.jpg

5) To copy files back and forth with scp:

Example:

copy a file from hadoop vm to your machine (using "." for the current directory, this will also keep the same name. If you want to specify a new filename with a directory, you can use that instead of "."):

Using the ip address you got before. When you are prompted for a password, it's "training".11.png.jpg

Example:

copy a file from your machine (it is called File_for_sending_to_VM.png in here) to the hadoop vm (and overwrite "my_filename" on the hadoop vm):

Using the ip address you got before. When you are prompted for a password, it's "training".14.png.jpg