Example 1 - Set Up 2 VMs and Ping¶
In this short experiment you’ll learn how to set up 2 virtual machines that can ping each other on the GENI platform. You’ll need to get GENI credentials before you can complete this example.
If you run into any problems with this tutorial, reach out to kenny at mozillafoundation dot org.
Step 2. Open Flack In A New Tab¶
Flack is an in-browser tool written in Flash. It’s likely you already have flash installed, but if you don’t you can get it here:
Open Flack in a new tab or browser window. Flack can be found here: www.protogeni.net/trac/protogeni/wiki/Flack . You should see Flack initialize in the window, as in the figure below:
Figure 2: Flack Initialized
Step 3. Log In With Flack¶
Click the green “Log In” button above. Here, you are expected to paste your GENI private key. But because we are already logged into our management authority via another tab, we can complete this step easily and have our private key information inserted automatically.
Along the top of the prompt, there should be a button and dropdown box that says “Download from [Select authority]” as in the figure below.
Select your management authority’s domain from the dropdown. The correct domain to choose will match up with the domain where you logged in at Step 1.
Once the correct item is selected, click the “Download” button next to the option list. Your certificate (credentials) should appear, as in the figure below:
Finally, enter the private key passphrase that you used when you signed up at your management authority when you signed up. Click “OK” on the bottom left.
At this point, Flack will attempt to retrieve resources from the various authorities. When prompted to select where to list resources from, leave all of the options checked and click “Continue”. Flack will gather the resources lists, and display a map of North America, as pictured below:
Step 4. Create a New Slice¶
You’re now ready to create a GENI “slice.” Your slice is a GENI-wide environment that you can add resources to, and run experiments in. For more on GENI terminology, see the glossary.
Click on the “New” button in the top-left corner of Flack, and enter a name for this slice. Your slice name will have to be unique from all other GENI slices, so it cannot be the same name as in the example.
When you’re finished typing the name of your slice, click “OK”. Once your slice has been created (it may take a moment), you’ll see a blank pane with the name of your slice toward the top of your screen. The blank pane on the right is where we’ll set up our experiment.
Step 6. Send A Ping From One Node to the Other¶
At the last step in Step 5, you should see the connection info for each node listed to the right of it. For example, the hostname and port of the nodes in the example are.
- VM: Host
- VM-0: Host
If I open a terminal window, I should be able to connect to both without using a password:
Logging into VM
Logging into VM-0
As mentioned before, the hosts are already networked, and conveniently, there are already hosts for the appropriate IPs for VM and VM-0 in each host file:
At this point, we’re ready to
ping one host from the other. Open the window for machine VM and type:
ping -c 2 VM-0
This will ping VM-0 twice. The
-c flag allows us to limit the number of pings to 2. You should see something very similar to:
If you did, congratulation! You’ve just confirmed your two new GENI VMs can talk to each other! If you’re a bit handy with client/server apps, what might you be able to code up at this point?
If things didn’t go so well, see the troubleshooting section below and see if you can address any issues.
Did this experiment fail to go as planned? Ping kenny at mozillafoundation dot org and share the details. Or, see if your problem can be addressed below.
I clicked ‘Submit’ to create my machines, but there was an error¶
Occasionally a request to provision machines cannot be fulfilled. You can always try:
- Deleting the failed resources if necessary (a red background means failure)
- Submitting the request again
- Trying to provision machines from a different management authority
I can’t log into my machines via SSH¶
Double check that your public SSH key (usually on your computer at something similar to
~/.ssh/id_rsa.pub) is registered with your Management Authority user account. When your machines are provisioned by GENI, your public key will be placed in the
~/.ssh/authorized_keys file on each host so you will have a password-less login.