C2115 Practical introduction to supercomputiong Lesson 4 -1- C2115 Practical introduction to supercomputing Lesson 4 Petr Kulhánek kulhanek@chemi.muni.cz National Centre for Biomolecular Research, Faculty of Science Masaryk University, Kamenice 5, CZ-62500 Brno Revision 1 C2115 Practical introduction to supercomputiong Lesson 4 -2Ubuntu 18.04 (code name: bionic) http://www.ubuntu.com/ ➢ Installation of Ubuntu Server VirtualBox, access via ssh, installation of applications C2115 Practical introduction to supercomputiong Lesson 4 -3Virtualization - Hypervisor HardwareHardware Host OS Hypervisor OS 1 OS 2 OS 3 Virtualization are procedures and techniques that access to available resources in a different way than they physically exist. Virtualization can be done at different levels, from the whole computer (so-called. virtual machine), to its individual hardware components (e.g., virtual processors, virtual memory, etc.), or only the software environment (virtualization of operating system). source: www.wikipedia.org Hypervisor - virtual machine administrator Guest OS (in a virtual machine) VirtualBox www.virtualbox.org Supported host OS: MS Windows, Mac OS X, Linux License: freeware + proprietary extension for noncommercial use C2115 Practical introduction to supercomputiong Lesson 4 -4PLEASE CAREFULLY READ FOLLOWING INSTRUCTIONS C2115 Practical introduction to supercomputiong Lesson 4 -5Exercise 1 Install Ubuntu Server 18.04 in a virtual environment VirtualBox. 1. Download the installation image (ISO) for Ubuntu Server 18.04.5 LTS (64 bit version). Download the installation image to your scratch directory (/scratch/login_name) [storage path can be changed in Firefox settings]. 2. Settings VirtualBox (File -> Preferences) 1. Default Machine Folder: change to a subdirectory (of your choice) in your scratch directory (/scratch/login_on me) 3. Creating a virtual machine 1. Machine name at your discretion, Linux, Ubuntu 64 bit, leave other settings at default values. 2. Verify that a virtual disk has been created for you in your scratch directory (Settings: Storage, select a virtual disk from the list, verify the path specified in the "Location") C2115 Practical introduction to supercomputiong Lesson 4 -6Exercise 1, continued 4. Virtual machine settings 1. Network -> Attached to: NAT 2. Network -> Advanced -> Port Forwarding 1. Host Port: 2222 2. Guest Port: 22 3. Leave the rest unchanged 5. Start the virtual machine 1. Choose installation media, choose installation ISO image. 2. When installing follow the instructions on the next page. C2115 Practical introduction to supercomputiong Lesson 4 -7Brief installation instructions 1. territory - Czech Republic (in Others -> Europe) 2. English keyboard (US) - do not use autodetection 3. machine name - any name (letters only, no accents) 4. Creating a user: 1. username - any 2. login name - SAME* as on the WOLF cluster 3. password - preferably the same as on a WOLF cluster (not a condition), do not use the numeric part of the keyboard to enter the password 5. do not encrypt your home directory 6. use the entire disk without LVM 7. install OpenSSH server (selection is indicated by the key Space), if you forget to choose, it is possible to install later using: 8. Grub install to MBR (Master Boot Record) equipment /dev/sda Note: graphical interface can be installed via ubuntu-desktop package (we don’t do it, it's time consuming and increases memory requirements of the virtual machine) $ sudo apt-get install openssh-server * otherwise you will greatly complicate your life C2115 Practical introduction to supercomputiong Lesson 4 -8Virtual Network ssh remote term. # 2 (console) ssh remote term. # 3 (console) port 2222 ssh server port 22 VirtualBox NAT Host machine (wolfXX) Screen local terminal # 1 Ubuntu server virtual machine (ubuntu) ID: ubuntu ID: wolfXX port forwarding ssh remote term. #4 (console) the virtual machine can access the external network via NAT the virtual machine cannot be accessed directly from the external network ssh server port 22 ssh remote term. #1 (console) C2115 Practical introduction to supercomputiong Lesson 4 -9Exercise 2 1. Log in to the running instance of the virtual machine through the graphical interface of the virtualization environment. 2. Log in to the running instance of the virtual machine using the program ssh from the host computer. Open several independent sessions. 3. Using command w (or who) list the current sessions on the virtual machine. 4. Log in to the running instance of your virtual machine using the program ssh from node wolf01. ssh -p 2222 server_login@wolfXX or ssh -p 2222 server_login@localhost version with "localhost“ must be started from the machine on which your virtual machine is running part "server_login@ “ will be used if you created an account with a different login name during installation ("server_login“ will be replaced by your login name in the virtual machine) C2115 Practical introduction to supercomputiong Lesson 4 -10Exercise 3 1. Install the program mc : $ sudo apt-get install mc 2. What is the program mc for? 3. Shut down the server: $ sudo poweroff 4. Turn on the server. 5. Create snapshot of the virtual machine (Machine->Take Snasphot ...) 6. Log in interactively as superuser ($ sudo su -) 7. What is NAT? 8. Install the package "pi“. What is it used for? install a package (application) named mc Package overview: https://packages.ubuntu.com/