OpenNebula4 New User Quick Start Tutorial¶
- Table of contents
- OpenNebula4 New User Quick Start Tutorial
In order to be able to start Virtual Machines (VMs) in FermiCloud you should follow this steps (only once):
1. Create FermiCloud account¶
It is necessary to apply for an account to use FermiCloud, any registered employee, contractor, or visitor of Fermilab can do this.
New request should be submited via the Service Desk. Request FermiCloud Account
You will be able to instantiate, delete and monitor VMs from both the SSH command line and the web GUI.
Note if you do not currently have a user, contractor, or employee ID at Fermilab you need to request a off-site Fermilab ID number first
https://fermi.service-now.com/new_acct_request.do
For affiliated institution select "Computing Division". For contact list Steven Timm.
More instructions can be found at https://fermi.service-now.com/kb_view.do?sysparm_article=KB0010797
2. SSH in FermiCloud and start a test VM¶
1. Get a valid kerberos ticket and ssh in fcluigpvm02.fnal.gov. (if off-site)
1a. from fcluigpvm02.fnal.gov ssh into fcluigpvm01.fnal.gov
HINT: you should be forwarding your kerberos ticket (this is client SSH setup). Some useful links if you have trouble with this here: http://fermigrid.fnal.gov/windows-access.html and here:http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4259969
2. Run 'onetemplate list'.
If you had something in your login script previously that sourced user.sh you should not do that anymore.
There is a system login script that automatically puts all commands into your PATH and
makes your temporary credential.
This is what you should run:
ssh -K $USER@fcluigpvm01.fnal.gov onetemplate list
This is approximately what you should see:
timm$. ssh -K -l timm fcluigpvm01.fnal.gov Checking if /tmp/x509up_u2904 can be reused ... no Authorizing ...... authorized Fetching certificate ..... fetched Storing certificate in /tmp/x509up_u2904 Your certificate is valid until: Tue Nov 3 13:36:21 2020 export ONE_AUTH=/tmp/2904/.one/one_x509 -bash-4.1$ onetemplate list ID USER GROUP NAME REGTIME 199 oneadmin oneadmin SLF7Vanilla_DynamicIP 02/09 10:16:17 202 oneadmin oneadmin SLF7V_DynIP_Home 02/16 15:07:23 280 oneadmin oneadmin SLF7V_DynIP_IPV6 03/28 21:34:43
Note that the login is making you a token that has an expiration date of
one hour. If the "onetemplate list" command used to work and then quits working, the
token has expired. Log out and log back in.
3. Start a SLF7 VM, name it '$USER test VM', then check if it's online:
This is what you should run:
onetemplate instantiate "SLF7V_DynIP_Home" --name "$USER test VM" onevm list sleep 100 one_check-pingVMs.sh
You should see something like:
-bash-4.1$ onetemplate instantiate "SLF7V_DynIP_Home" --name "$USER test VM" VM ID: 1668 -bash-4.1$ onevm list ID USER GROUP NAME STAT UCPU UMEM HOST TIME 1668 timm users timm test VM pend 0 0K 0d 00h00 To get a Scientific linux 7: onetemplate instantiate "SLF7V_DynIP_Home" --name "$USER test VM" -bash-4.1$ one_check-pingVMs.sh +OK - Pingable VMs (1/1): timm users timm test runn 2 2G fcl412 00 01:37:40 fermicloud032.fnal.gov. -bash-4.1$
From the output you can see that VM ID 1668 is owned by user timm, it's running on a host named fcl412 and it's hostname is 'fermicloud032.fnal.gov'.
The VM ID is unique, VM ID 1668 will be only this VM and once it is removed no other VM will reuse this ID. The hostname of the VM (fermicloud032.fnal.gov) will not change for the lifetime of the VM, but after you remove the VM the hostname gets reused.
4. Let's try to SSH in the freshly created VM, you are root in this machine and from now on you will be the admin.
ssh root@fermicloudO32.fnal.gov
At this point you could do whatever you need to do with the VM (eg: software testing)
5. Cleanup. Now that you are done with the VM, it is time to remove it. SSH in fcluigpvm01.fnal.gov and use 'onevm delete $ID' or 'onevm shutdown $ID' to remove the VM.
-bash-4.1$ onevm delete 1668 Are you really sure you want to delete this VM? Type a Capital Y Y You seem sure, we proceed -bash-4.1$ onevm list | grep 1668 -bash-4.1$
For the standard type of VMs that you get from FermiCloud both 'onevm delete' (hard stop + delete) and a 'onevm shutdown' (ordered shutdown + delete) will completely remove them.
You can only remove your own VMs.
3. Open the web GUI and start a test VM¶
1. Get a valid Kerberos certificate loaded in your web browser (eg: firefox). You can find instructions here http://computing.fnal.gov/authentication/kca/
2. Open this link from your web browser: http://fermicloud.fnal.gov
3. Click on 'Virtual Machines' from the left menu, here you will see are your VMs.
4. To create a new VM click on the upper left button labeled '+New'. A new form will pop up, here you should type a name for you to identify the VM, select a template and the number of VMs to create. Hit the Create button.
5. If the page does not self-refresh hit the refresh button (by the +New button). Once you see your new VM you can proceed to delete it using the Delete button at the upper right corner.
Now you're ready to use FermiCloud! For more details and VM flavours please take a look at the OpenNebula4 Quick User Guide