lab #5 guide: installing ubuntu as a virtual...

104
Lab #5 Guide: Installing Ubuntu as a Virtual Machine CTEC1863/2019F Operating Systems Mike Boldin

Upload: others

Post on 02-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Lab #5 Guide:

Installing Ubuntu as a

Virtual Machine

CTEC1863/2019F

Operating SystemsMike Boldin

Page 2: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Tools, Materials and Equipment

• Oracle VirtualBox software– official site:

https://www.virtualbox.org/wiki/Downloads

• Ubuntu 18.04.3 LTS .iso file – official site:

https://www.ubuntu.com/download/desktop

• Minimum 25 GB of hard disk space

• USB 3.0 flash drive (32 GB or larger) or hard disk or SSD

CTEC1863 Lab 5 Guide 2019F 2

Page 3: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Tools, Materials and Equipment

• If you want to use the Dell machines in L17, you require a 32 GB or larger USB 3.x storage device (a hard disk is recommended; formatted as NTFSor exFAT) to back up your VM files at the end of each lab (for your own protection!)

• On the Dells in L17, you can install your VM onto the SSD (E: drive; create your own folder) –choose the No Hyper-V windows installation at boot.

CTEC1863 Lab 5 Guide 2019F 3

Page 4: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu

• Summary of recommended minimum requirements:

– 2 GB RAM

– 1024 x 768 graphics resolution

• https://help.ubuntu.com/community/Installation/SystemRequirements

CTEC1863 Lab 5 Guide 2019F 4

Page 5: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

VIRTUAL MACHINE (VM) SETUPCTEC1863

CTEC1863 Lab 5 Guide 2019F 5

Page 6: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

New Virtual Machine Example

• The following are actual screen shots from the installation on a PC in L17, which has an 8-core Intel i7 processor and 32 GB RAM.

• My VirtualBox version is 6.0.10.

• Follow these slides to set up your own VM.

CTEC1863 Lab 5 Guide 2019F 6

Page 7: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

New

CTEC1863 Lab 5 Guide 2019F 7

Page 8: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Name and operating system

CTEC1863 Lab 5 Guide 2019F 8

Type in“Ubuntu” intothe Name box –Add yourinitials, to keep thename unique.

VirtualBox will correctlyset the Typeand Version.

Click on Next.

Page 9: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Basic Settings: RAM

CTEC1863 Lab 5 Guide 2019F 9

Choose an appropriate amount of RAM (min. 1 GB; I chose 2 GB; in L17, 4 GB or even 8 GB will work.)

Page 10: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Basic Settings: Hard drive

CTEC1863 Lab 5 Guide 2019F 10

NOTE:10 GB is the bare

minimum size –

12 GB or more is recom-

mended

Page 11: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Basic Settings: Hard drive

CTEC1863 Lab 5 Guide 2019F 11

We are using only VirtualBox; the default file type is .vdi.

Page 12: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Basic Settings: Hard drive

CTEC1863 Lab 5 Guide 2019F 12

Dynamically allocated is good enough; Fixed size will take slightly longer to create

Page 13: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Basic Settings: Hard drive

CTEC1863 Lab 5 Guide 2019F 13

The drive will be created on the SSD (it will be faster.)

I chose 12 GB so that both my Ubuntu and CentOS VMs can be backed up to a 32 GB flash drive.

Page 14: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

VM Created

CTEC1863 Lab 5 Guide 2019F 14

Next, click on “Settings” to fine tune the VM and complete the setup.

Page 15: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

VM Settings: General

CTEC1863 Lab 5 Guide 2019F 15

Categories are on the left; some setting categories have additional tabs.

Page 16: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: General

CTEC1863 Lab 5 Guide 2019F 16

The Bidirectional Clipboard will allow you to copy-and-paste to and from Windows, Ubuntu, and even other VMs

Page 17: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Motherboard

CTEC1863 Lab 5 Guide 2019F 17

The Ubuntu .isofile will be set up as an Opticaldrive; we need the VM to be able to boot from it.

Page 18: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: VRAM

CTEC1863 Lab 5 Guide 2019F 18

Page 19: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Network

CTEC1863 Lab 5 Guide 2019F 19

(Skipping "Storage" for now…)

By choosing “Bridged Adapter”, your VM will connect to the LAN directly (i.e., in L17, to the CIT network.)

Page 20: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Storage

CTEC1863 Lab 5 Guide 2019F 20

1

4

3

2

Next, you are going to locate the Ubuntu .iso file and set it as your Primary Master Optical Drive. Step 3 is a "browse" button, that will pop up a window so that you can find the file.

Page 21: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Storage

CTEC1863 Lab 5 Guide 2019F 21

Here, I copied the .iso file into E:\MB .before I started creating my VM…

It can go anywhere, VirtualBox will remove it from the VM settings after Ubuntu is installed.

Page 22: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Storage

CTEC1863 Lab 5 Guide 2019F 22

Optical Drive is set up.

Page 23: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Shared Folders

• This feature allows the virtual machine (Guest) to access the native (Host) file system

• It allows you to easily exchange files between the VM and your computer

• For example, in L17, I choose my ”personal” directory on the SSD: E:\MB

• It will be accessible in Ubuntu as /host

CTEC1863 Lab 5 Guide 2019F 23

Page 24: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Additional Settings: Shared Folders

1

CTEC1863 Lab 5 Guide 2019F 24

2

3

4

5

67

Page 25: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

VM Created

CTEC1863 Lab 5 Guide 2019F 25

Page 26: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

UBUNTU INSTALLATIONCTEC1863

CTEC1863 Lab 5 Guide 2019F 26

Page 27: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 27

After clicking “OK” to save the Settings, click on “Start” in the VirtualBox VM Manager to start the VM.

It should boot from the installation media.

VirtualBox will display two messages, which can be dismissed…

Page 28: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Vbox (Annoying) Messages

CTEC1863 Lab 5 Guide 2019F 28

If you click on the “X”, the messages will go away once, and re-appear during the next boot.

If you click on the other button (message “bubble” with a slash through it), these messages will not be displayed again.*

* Unfortunately, the DeepFreeze software on the L17 Applications/No Hyper-V Windows 10 installations prevents this from day-to-day. If it really annoys you, download and install the same VirtualBox software in L17 Open.

Page 29: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 29

Page 30: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 30

Page 31: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

You can resize the installer window…

CTEC1863 Lab 5 Guide 2019F 31

Page 32: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

You can resize the installer window…

CTEC1863 Lab 5 Guide 2019F 32

Page 33: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 33

Page 34: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 34

Page 35: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Automatic disk partitioning

• Let the Ubuntu installer decide how much of the disk to use for swap space; the remainder will be used for the root directory

CTEC1863 Lab 5 Guide 2019F 35

Page 36: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Select Time Zone

CTEC1863 Lab 5 Guide 2019F 36

Click on the map to find Toronto(the closest city that represents the “EST5EDT” time zone in Eastern Canada.)

Page 37: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Create User and Set Hostname

CTEC1863 Lab 5 Guide 2019F 37

Use your BB username; add your initials to the computer name; a strong password will prevent others from getting into your files…

Page 38: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 38

There is an eight-slide presentation while Ubuntu installs (progress bar at the bottom of the window)…

Page 39: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 39

Page 40: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 40

Page 41: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 41

Page 42: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 42

Page 43: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 43

Page 44: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 44

Page 45: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 45

Page 46: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installation Complete

• The installation may take around 15 minutes

• VirtualBox will boot from the virtual hard drive

• You can edit the VM Settings to remove the Ubuntu installation CD

CTEC1863 Lab 5 Guide 2019F 46

Page 47: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 47

VirtualBox will now boot from the hard disk…

First Boot

Page 48: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Windows is the "Host"; Ubuntu is the "Guest"

CTEC1863 Lab 5 Guide 2019F 48

Press the right Ctrl key to give control of the keyboard and mouse back to Windows…

Page 49: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Login

CTEC1863 Lab 5 Guide 2019F 49

Click on your user (or press Enter to log in)

Page 50: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Login

CTEC1863 Lab 5 Guide 2019F 50

Type in your password (it will not be shown) and press Enter

Page 51: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Login

CTEC1863 Lab 5 Guide 2019F 51

If you get your password wrong, Ubuntu will tell you. If you forget your password, there is a way to "break in"… (only because I have "physical" access!)

Page 52: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu First Login

CTEC1863 Lab 5 Guide 2019F 52

Page 53: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu First Login

CTEC1863 Lab 5 Guide 2019F 53

The ”Livepatch” feature is optional; you need to create an Ubuntu account to enable it.

The system updates itself and you will be shutting down at the end of lab periods anyway…

Page 54: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu First Login

CTEC1863 Lab 5 Guide 2019F 54

Seems that everybody is doing this now! (Apple, Microsoft, Google, …)

Page 55: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu First Login

CTEC1863 Lab 5 Guide 2019F 55

Page 56: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Desktop

CTEC1863 Lab 5 Guide 2019F 56

Page 57: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Desktop

CTEC1863 Lab 5 Guide 2019F 57

Page 58: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Ubuntu Desktop

CTEC1863 Lab 5 Guide 2019F 58

Page 59: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Applications

CTEC1863 Lab 5 Guide 2019F 59

Page 60: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Applications

CTEC1863 Lab 5 Guide 2019F 60

Page 61: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Applications

CTEC1863 Lab 5 Guide 2019F 61

Page 62: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater

3

CTEC1863 Lab 5 Guide 2019F 62

• From time to time, Ubuntu will automatically ask you to download updates

• You can also check manually

Page 63: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater

CTEC1863 Lab 5 Guide 2019F 63

The update process usually takes a couple of minutes (depending on your Internet speed); sometimes you will be asked to reboot when it is complete.

Page 64: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Authenticate for System Administration Tasks

CTEC1863 Lab 5 Guide 2019F 64

The “Authenitication Required” pop-up is similar to Microsoft’s ”User Account Control” (UAC) … to do system administration tasks, you need to enter your password.

Page 65: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater

CTEC1863 Lab 5 Guide 2019F 65

The update process usually takes a couple of minutes (depending on your Internet speed); sometimes you will be asked to reboot when it is complete. You can click on "Details" to watch what is being updated…

Page 66: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater - Details

CTEC1863 Lab 5 Guide 2019F 66

Various software packagesare listed…

(Ubuntu uses the Debian package manager system.)

Page 67: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater – Kernel

CTEC1863 Lab 5 Guide 2019F 67

From time to time, the Linux kernelis updated, too. (It is usually installed last and then the boot loader configurationis updated.)

This usually requires a restart…

Page 68: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Updater - Restart

CTEC1863 Lab 5 Guide 2019F 68

You can also select "Restart Later" and continue working (the system will remain stable and, unlike some other operating systems, not "nag" you to restart – the updates will simply take effect next time Ubuntu starts…)

Page 69: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Terminal

• Ctrl-Alt-T (from the desktop)

CTEC1863 Lab 5 Guide 2019F 69

Page 70: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Becoming "root"• a.k.a., the System Administrator

CTEC1863 Lab 5 Guide 2019F 70

The "prompt character" changes from $ to #. To exit, press [Ctrl]+[D], enter the exit command, or simply close the Terminal window.

Page 71: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Custom Terminal

• Edit -> Preferences

CTEC1863 Lab 5 Guide 2019F 71

I prefer black text on a white background, with a larger font, and a large amount of scrollback lines.

(Eventually, I will customize the shell prompt to correct the contrast issue of light green text on a white background.)

Page 72: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Software Management from the Terminal -- apt

CTEC1863 Lab 5 Guide 2019F 72

Page 73: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Preparing for Guest Additions

• The VirtualBox Guest Additions enable features like the shared clipboard, shared folders, USB, video modes, etc.

• The software builds itself, based on the current kernel version.

• On some versions of Ubuntu, development tools need to be installed. From the terminal, run the following commands, as root:

apt install linux-headers-$(uname -r)apt install build-essentialapt install dkms

CTEC1863 Lab 5 Guide 2019F 73

Page 74: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Preparing for Guest Additions

• Article for installing Guest Additions:

https://www.tecmint.com/install-virtualbox-guest-additions-in-ubuntu/

CTEC1863 Lab 5 Guide 2019F 74

Page 75: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installing Guest Additions

CTEC1863 Lab 5 Guide 2019F 75

You should reinstall Guest Additions whenever the VirtualBox software is updated.

Page 76: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Inserting Guest Additions

CTEC1863 Lab 5 Guide 2019F 76

This will launch a new Terminal window…

Page 77: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installing Guest Additions - FAIL

CTEC1863 Lab 5 Guide 2019F 77

This error appears if you forget to install the prerequisites (see slide 73 “Preparing for Guest Additions”)

Page 78: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 78

Installing Guest Additions – from the Terminal

When I run the apt command(s) to install the pre-requisites, itshows all thepackages, andthen waits for meto confirm…

Page 79: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 79

Installing Guest Additions – from the Terminal

To find out whereLinux installed theVBGA CD-ROM, Irun the mountcommand. Then Ilook for “VBox_GAs…”

Page 80: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installing Guest Additions – from the Terminal

• Change to the VBoxAdditions.iso virtual CD-ROM device. Use the Tab key to help complete the filename. For example:

sudo ./VBoxLinuxAdditions.run

• Then, run the Linux installer:

cd /media/mboldin/VBox_GAs_6.0.10/

• Finally, restart Ubuntu.CTEC1863 Lab 5 Guide 2019F 80

Page 81: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

CTEC1863 Lab 5 Guide 2019F 81

Installing Guest Additions – from the Terminal

Here are both the cd and GA installer commands… SUCCESS!!!

Page 82: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installing Guest Additions

CTEC1863 Lab 5 Guide 2019F 82

. . .

Page 83: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Installing Guest Additions from the Desktop (alternative method)

CTEC1863 Lab 5 Guide 2019F 83

Page 84: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Restarting

CTEC1863 Lab 5 Guide 2019F 84

1

2 3

This procedure is also used to properly shutdown (i.e., Power Off) the VM.

Page 85: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Changing System Settings

CTEC1863 Lab 5 Guide 2019F 85

1

2

Page 86: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Changing System Settings: Display Resolution

CTEC1863 Lab 5 Guide 2019F 86

3

4

5

When you click on Apply, it will ask for a confirmation.(If you don’t see the “Apply” button, you can manually widen the window.)

Page 87: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Changing System Settings: Display Resolution

CTEC1863 Lab 5 Guide 2019F 87

There will be a confirmation pop-up… and then the Desktop will look much better! (For example, I used 1152x864 on the Viewsonic monitor in L17.)

Page 88: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Custom Launcher

CTEC1863 Lab 5 Guide 2019F 88

Unlock apps you don’t use – right click and choose “Remove from Favorites”.

Similarly, for new apps that you start and plan to use frequently (i.e., Terminal), you can right click and add them to the Launcher.

Page 89: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

SHARED FOLDER BETWEEN HOST AND GUEST

CTEC1863

CTEC1863 Lab 5 Guide 2019F 89

Page 90: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Accessing Your Shared Folder

• You need to add your username to the vboxsfgroup to access the shared host folder. To do this, edit the /etc/group file:

vboxsf:x:999:mboldin

• Add your username to the end of the line containing vboxsf. For example:

sudo nano /etc/group

• Ctrl-O will save; Ctrl-X exits the nano editor.CTEC1863 Lab 5 Guide 2019F 90

Page 91: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Accessing Your Shared Folder

1: use the down and right arrow keys to move the cursor

2: add your username to the end of the line

3: Ctrl-O to save4

CTEC1863 Lab 5 Guide 2019F 91

Page 92: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Accessing Your Shared Folder

• Logout and login again to activate the change. (You may need to reboot.) The shared folder is found in /media.

• The screenshot shows the contents of my Mac home directory. Directories (folders) are coloured blue, files green, and links (shortcuts) turquoise.

CTEC1863 Lab 5 Guide 2019F 92

Page 93: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Accessing Your Shared Folder

CTEC1863 Lab 5 Guide 2019F 93

My shared folder is shown on the Desktop.

Clicking on it will open the File Manager app.

This slide also shows my customized Launcher.

Page 94: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

VM BACKUPCTEC1863

CTEC1863 Lab 5 Guide 2019F 94

Page 95: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

• Shut down Ubuntu. The VirtualBox manager will show it to be Powered Off.

• A USB 3.x hard drive is recommended; USB flash drives tend to have very poor write performance!

CTEC1863 Lab 5 Guide 2019F 95

Page 96: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

• This method simply copies the VM folder to an external drive.

• This method is very useful for transporting the VM to another computer.

• Once you stabilize the Settings for the VM on each computer, only the virtual hard disk file(.vdi) needs to be backed up.

CTEC1863 Lab 5 Guide 2019F 96

Page 97: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

CTEC1863 Lab 5 Guide 2019F 97

From a Command Prompt , I can view the VM folder. Here I am using the No Hyper-V Windows 10 installation in L17, so the SSD is mapped to drive E:

VM settings(current)

VM settings(backed up by VirtualBox)

Virtual hard disk

Page 98: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

CTEC1863 Lab 5 Guide 2019F 98

My USB hard drive is mapped to drive J: -- I will use robocopy to backup the entire VM folder.

Page 99: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

CTEC1863 Lab 5 Guide 2019F 99

I only need the /E switch, the others are robocopy defaults.

Page 100: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Backing Up The VM

CTEC1863 Lab 5 Guide 2019F 100

The whole process took less than two minutes (it will get longeras the VM hard disk file grows…)

Page 101: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Adding the Backed Up VM VirtualBox

CTEC1863 Lab 5 Guide 2019F 101

• This procedure applies to:

1. Using No Hyper-V in L17 (due to DeepFreeze);

2. Using another PC with VirtualBox.

• Simply copy the backed up folder from your USB drive to the computer’s hard drive (or back to the L17 PC’s SSD) into the VirtualBoxVMs folder.

Page 102: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Adding an Existing VM to VirtualBox

CTEC1863 Lab 5 Guide 2019F 102

After restoring your backed-up VM folder, start VirtualBox and from the Machine menu, click Add…

Page 103: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Adding an Existing VM to VirtualBox

CTEC1863 Lab 5 Guide 2019F 103

A dialog box opens. Browse to your VM folder and select the .vbox file (the type is “VirtualBox Machine Definition”)…

Page 104: Lab #5 Guide: Installing Ubuntu as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM_Ubuntu_Guide... · to access the native (Host) file system •It allows

Adding an Existing VM to VirtualBox

CTEC1863 Lab 5 Guide 2019F 104

When you click Open, VirtualBoxwill add your VM (in a PoweredOff state).

NOTE: You may need to “tweak” some settings (RAM, CPUs, and Network card) to get it to work… but generally, this is done only once per PC or Mac.