Last Updated on January 30, 2024 by InfraExam
13.6.1 Lab – Install Linux in a Virtual Machine and Explore the GUI Answers
Lab – Install Linux in a Virtual Machine and Explore the GUI (Answers Version)
Answers Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Part 1: Prepare a Computer for Virtualization
Part 2: Install a Linux OS on the Virtual Machine
Part 3: Explore the GUI
Background / Scenario
Computing power and resources have increased tremendously over the last 10 years. A benefit of multi-core processors and large amounts of RAM is the ability to install multiple operating systems through the use of virtualization on a computer.
With virtualization, one or more virtual computers can operate inside one physical computer. Virtual computers that run within physical computers are called virtual machines. Virtual machines are often called guests, and physical computers are often called hosts. Anyone with a modern computer and operating system can run virtual machines.
In this lab, you will install a Linux OS in a virtual machine using a desktop virtualization application, such as VirtualBox. After completing the installation, you will explore the GUI interface. You will also explore the command line interface using this virtual machine in a lab later in this course.
- Computer with a minimum of 2 GB of RAM and 10 GB of free disk space
- High-speed Internet access to download Oracle VirtualBox and Linux OS image, such as Ubuntu Desktop
Part 1: Prepare a Computer for Virtualization
In Part 1, you will download and install desktop virtualization software and a Linux OS image. Your instructor may provide you with a Linux OS image.
Step 1: Download and install VirtualBox.
VMware Player and Oracle VirtualBox are two virtualization programs that you can download and install to support the OS image file. In this lab, you will use the VirtualBox application.
- Navigate to https://www.virtualbox.org/. Click the download link on this page.
- Choose and download the appropriate installation file based on your operating system.
- After the VirtualBox installation file is downloaded, run the installer and accept the default installation settings.
Step 2: Download a Linux Image.
- Navigate to the Ubuntu website at http://www.ubuntu.com. Click the Download link on this page to download and save an Ubuntu Desktop image.
Step 3: Create a New Virtual Machine.
- Click Start and search for Virtualbox. Click Oracle VM VirtualBox to open the manager. When the manager opens, click New to start the Ubuntu installation.
- In the Name and operating system screen, type Ubuntu in the Name field. For the Type field, select Linux. In the Version field, select the corresponding downloaded version. Click Next to continue.
- In the Memory size screen, increase the amount of RAM as long as the amount of RAM for the virtual machine is in the green area. Going beyond the green area would adversely affect the performance of the host. Click Next to continue.
- In the Hard disk screen, click Create to create a virtual hard disk now.
- In the Hard disk file type screen, use the default file type settings of VDI (VirtualBox Disk Image). Click Next to continue.
- In the Storage on physical hard disk screen, use the default storage settings of dynamically allocated. Click Next to continue.
- In the File location and size screen, you can adjust the hard drive and change the name and location of the virtual hard drive. Click Create to use the default settings.
- When the hard drive creation is done, the new virtual machine is listed in the Oracle VM VirtualBox Manager window. Select Ubuntu and click Start in the top menu.
Part 2: Install Ubuntu on the virtual machine
Step 1: Mount the Image.
- In the Oracle VM Virtualbox Manager window. Right-click Ubuntu and select Settings. In the Ubuntu – Settings window, click Storage in the left pane. Click Empty in the middle pane. In the right pane, click the CD symbol and select the file location of the Ubuntu image. Click OK to continue.
- In the Oracle VM VirtualBox Manager window, click Start in the top menu.
Step 2: Install the OS.
- In the Welcome screen, you are prompted to try or install Ubuntu. The try option does not install the OS, it runs the OS straight from the image. In this lab, you will install the Ubuntu OS in this virtual machine. Click Install Ubuntu.
- Follow the on-screen instructions and provide the necessary information when prompted.
Note: If you are not connected to the Internet, you can continue to install and enable the network later.
- Because this Ubuntu installation is in a virtual machine, it is safe to erase the disk and install Ubuntu without affecting the host computer. Select Erase disk and install Ubuntu. Otherwise installing Ubuntu on a physical computer would erase all data on the disk and replace the existing operating system with Ubuntu. Click Install Now to start the installation.
- Click Continue to erase the disk and install Ubuntu.
- In the Who are you? screen, provide your name and choose a password. Use iteuser for Your Name and ITEpass! for the password. You can use the username generated or enter a different username. If desired, you can change the other settings. Click Continue.
- The Ubuntu OS is now installing in the virtual machine. This will take several minutes. When the Installation is complete message displays, return to the Oracle VM Virtualbox Manager window. Right-click Ubuntu and select Settings. In the Ubuntu – Settings window, click Storage in the left pane. Click the mounted Ubuntu image in the middle pane. In the right pane, click the CD symbol and click Remove Disk from Virtual Drive. Click OK to continue.
- In the Ubuntu VM, click Restart Now.
Part 3: Explore the GUI
In this part, you will install the VirtualBox guest additions and explore the Ubuntu GUI.
Step 1: Install Guest Additions.
- Log on to your Ubuntu virtual machine using the user credentials created in the previous part.
- Your Ubuntu Desktop window may be smaller than expected. This is especially true on high-resolution displays. Click Device > Insert Guest Additions CD image… to install the Guest Additions. This allows more functions, such as changing the screen resolution in the virtual machine.
- Click Run to install the additions. When prompted for a password, use the same password that you used to log on. Click Authenticate to continue.
- If the computer was not connected to the Internet during the installation, click Devices > Network Settings in the Oracle VirtualBox menu. Enable network adapters and configure the proper setting for network connections as necessary. Click OK.
- When the installation of the additions is done, restart the virtual machine again. Click the menu in the upper-right corner and click Shut down. Click Restart to restart Ubuntu.
Step 2: Open a web browser.
- Log on to Ubuntu again. After you are logged on again, you can resize the virtual machine window.
- Open a web browser. Depending on the Linux distribution, you may need to search for a web browser or there is a link to a web browser already on the Desktop.
- Locate a terminal emulator to access the command line interface. You will be using a terminal emulator in later labs.
- Explore the installed Linux distribution and locate a few applications that you may use.
What are the advantages and disadvantages of using a virtual machine?
Type your answers here.
With a virtual machine, you are able to test new applications or operating systems without affecting your host machine. You are also able to save the current machine state when you close the virtual machine. If you have any issues, you have the option to revert the virtual machine to a previously saved state. On the other hand, a virtual machine requires hardware resources from the host machine, such as hard drive space, RAM, and processing power.