IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20...

Post on 09-Oct-2020

0 views 0 download

Transcript of IODE OTGA Training Course on Ocean Currents · IODE OTGA Training Course on Ocean Currents 16 –20...

IODE OTGA Training Course onOcean Currents

16 – 20 September 2019

Oostende, Belgium

CREATING A VIRTUAL MACHINE

Session 2.

2

Objective of The Session

After this session, you can run a virtual machine (VM) on your laptop that provides similar functionality to physical machine.

3

Hardware in Terms of Desktop Operating SystemsI. Windows

a. Has the biggest user base and business applicationsb. High licensing and migration costs

II. Mac OS Xa. lower maintenance and better securityb. Comes bundled with hardware.

III. Linux/Unixa. Free and runs well on old hardware that cannot

support Mac or Windows,b. Perfectly secure, extremely fast, low maintenance

requirements, and exceptional stability .

4

Operating System Selection Factors

1. Low costs

2. Low maintenance

3. User friendliness

4. Security and

5. Stability

5

All above factors point out that the optimal choice of an operating system (OS) for scientificapplications is the Linux-based OS.

Why Linux

• Unless you are a hobbyist, you probably don’t install an OS very often.

• Windows normally comes pre-installed.

• You can do a basic install of Linux very easily.

• You can customize things if you want to.

• You will also gain nerd-points for knowing how your computer works. ☺

6

Installing Linux – Hosting Scheme

Before installing Linux, think about which hosting scheme you want:

I. Devoted host - only Linux will run on your computer

II. Dual boot - Linux and another OS can be chosen at boot time

III. Virtual machine – multiple Operating Systems running at the same time

7

Perspectives of Installing Linux

1) Computational Efficiency: Devoted Host

2) Cost Effectiveness: Dual Boot

3) Training Purpose: Virtual Machine

8

Why Virtual Machine

• It is safer to test software on a virtual machine (the so-called “guest”) that is isolated from the operating system (the so-called “host”).

• A virtual machine can be fully reset as needed.• Last but not least, it is free.

9

What is a Virtual Machine?

In computing, a virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination. (source Wikipedia)

10

Composition of a Virtual Machine

1) Host Computer: Personal Computer running Windows

2) Virtualization Software: VirtualBox

3) Guest Operating System: Xubuntu (or Ubuntu)

11

Virtual Host Introduction

• A “virtual host” is a fully-functional computer environment, running in a window on a computer.

• The window is operated by “virtualization software” such as:

– Virtual Box (https://www.virtualbox.org/),

– VmWare (http://www.vmware.com/), or

– Parallels (http://www.parallels.com/).

12

What is VirtualBox

• A powerful x86 and AMD64/Intel64 virtualization product runs on Windows, Linux, Macintosh, and Solaris hosts.

• A community effort backed by a dedicated company (Oracle).

• Supports a large number of guest operating systems including but not limited to Windows, Linux, Solaris and OpenSolaris, OS/2, and OpenBSD.

13

The Advantages of Ubuntu

• The most popular Linux distribution, plenty of people and websites supporting it.

• User-friendliness and choice of huge repository of (free) software available make Ubuntu recommended for novice Linux users.

14

What is Xubuntu?

• Xubuntu is a community developed, GNU/Linux based Free/Open Source operating system. It is an officially recognized flavor of the popular Ubuntu operating system.

• The Xubuntu community is built around the ideals enshrined in the Ubuntu Philosophy

• Xubuntu = Ubuntu + Xfec

• http://xubuntu.org/about/

GUIDE TO INSTALL LINUX INSIDE WINDOWS USING VIRTUALBOX

16

https://itsfoss.com/install-linux-in-virtualbox/

Requirements

• Good internet connection to download software and Linux ISO. (You can also use some other computer with an internet connection to download these files.)

• Windows system with at least 12 GB of free space.

• Windows system with 4GB of RAM. (It can work with less RAM as well, but your system will start to lag while using Linux in the virtual machine.)

17

Steps to Create a VM

1. Download and install the most recent version of the virtualization software such as VirtualBox (v6.0 or later).

2. Download and install Oracle VM VirtualBox Extension Pack

3. Download and install the Xubuntu (or Ubuntu) operating system.

18

Download Oracle VM “VirtualBox”

19

https://www.virtualbox.org/

Downloading Oracle VM VirtualBox Extension Pack

• Download Oracle VM VirtualBox Extension Pack from the following URL: https://download.virtualbox.org/virtualbox/6.0.10/Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack

20

Downloading Guest Operating System

• Download the Xubuntu IOS image:

– xubuntu-18.04.3-desktop-amd64.iso or

– xubuntu-18.04.3-desktop-i386.iso

21

Installing Oracle VM VirtualBox I

22

Installing Oracle VM VirtualBox II

23

Installing Oracle VM VirtualBox III

24

Installing Oracle VM VirtualBox VI

25

Installing Oracle VM VirtualBox V

26

Installing Oracle VM VirtualBox VI

27

Installing Oracle VM VirtualBox VII

28

Click on the “finish” button to run the virtualization software, after it says “Virtual Box installation Complete.

VirtualBox Manager Window

29

Name and Operating System

30

Allocating Memory Size

31

Creating a Virtual Hard Disk

32

Choosing Hard Disk File Type

33

Choosing Storage on Physical Hard Disk

34

Selecting File Location and Size

35

Selecting Start-Up Disk

36

Select a Linux ISO image,Click “Start” to continue

Self-Explanatory Steps Forward

37

Click to install Xubuntu

Installation Type

38

It is safe to erase disk under virtual machine

Setting region

39

Setting names and password

40

Restarting your VM

41

You may close the VirtualBox, if it gets stuck on the screen after you restart your VM.

Installing Oracle VM VirtualBox Extension Pack

• It is highly recommended to download and install Oracle VM VirtualBox Extension Pack from the following URL: https://download.virtualbox.org/virtualbox/6.0.10/Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack

• Oracle VM VirtualBox extension pack provides better compatibility.

42

INSTALLING TRAINING TOOLKIT

43

Starting Your Virtual Machine

44

Login Screen

45

Desktop of the Virtual Machine

46

Click on the “Apps” icon

List of Applications

47

Downloading Training Toolkit

• Click on the “Apps” icon located at the upper left corner of the screen to open the Firefox browser

• Enter the following URL: https://classroom.oceanteacher.org/ in the address bar.

• Press <ENTER>

48

Ocean Currents Training Web Page

49

Location of Training Toolkit

50

Save it to the “Downloads” directory

Steps to Install Training Toolkit

1. Open a terminal on your VM by clicking on the “terminal” icon

51

Steps to Install Training Toolkit

2. Type “mv Downloads/octraining2019.tar.gz” and press the “ENTER” key to move the training toolkit file to your home directory.

3. Type “tar -xzf octraining2019.tar.gz” and press the “ENTER” key to unzip the compressed training toolkit package.

52

Steps of Installing Training Package

1. One shell script named “install_software.sh” and one directory named “octraining2019” with three sub-directory, “data”, “mLib”, and “pgms” should be created in the “home” directory.

2. To install the third-party (open source) software as a “root” user, you enter “sudo –s” at the system prompt followed by the root password.

3. Type “install_software.sh” and press the “ENTER” key, then follow the instruction on the screen, till the installation is completed.

53

Directory Structure of Your VM

/home/your_name (the default home directory)• Desktop• Documents• Downloads• octrainings2019• install_software.sh• octraining2019.tar.gz

54

Testing the VM Installation

Here are some simple tests to see if everything is working correctly

1. Start a Terminal window

2. Go to the “octraining2019/pgms” directory

3. View directory structure, type: ls -l

4. To verify that you have the GNU Octave installed correctly, type: octave

$ octave <ENTER>

55

Octave Main Window

56

Finishing the VM Installation

• Type “exit” to close the Octave main window.

• Type “exit” at the system prompt to close the terminal window.

57

Review of Unix Commands

58

Purpose-------------------------------------------1. show directory contents 2. change to your home directory3. change to local subdirectory4. change to directory data5. show whole contents of file.txt6. show contents of file.txt by more

('space' bar goes forward)7. copy A to B 8. delete (remove) A9. make a new directory A10. print current working directory

Linux Command----------------------------------1. ls -l2. cd3. cd dirA4. cd /home/adcpproc/data5. cat file.txt6. more file.txt

7. cp A B8. rm A9. mkdir A10. pwd

59

It’s time for a break!