COMP1071

Lab 00 - Create a new VM for the course

Virtual Machine (VM) Creation

In this lab, you will create a new Ubuntu Linux installation on a virtual machine. Create a virtual machine specifically for this class, as performing other tasks on it may modify the configuration in undesirable ways. Do NOT use the VMWare easy install option, or you will lose control over how the install is done and you may wind up having to start over. If you are using VMWare, disabling easy-install/auto-install is less than obvious, but this webpage describes the procedure.

  1. Download the Ubuntu server 20.04 iso image from Canonical while you perform the next steps, as the download may take a little while.
  2. Create a new virtual network in your VM software which is set to type host-only with dhcp enabled. We will be using this for our second network interface on our server, so pay attention to the name assigned to it by your VM software.
  3. Create a new virtual machine in your VM software. Name the virtual machine whatever you like. We will be changing this later.
  4. Assign at least 2 CPUs, 1GB of RAM, and 16GB of disk. You can assign more resources if you wish, but it is unnecessary.
  5. Set the network interface of your VM to bridged.
  6. Add a second network interface to your virtual machine, connected to the virtual host-only ethernet network you just created.
  7. Set the CD drive to use your downloaded Linux image as the install image.
  8. Start your virtual machine to boot from your downloaded iso image.

Ubuntu Install

When you have created the VM, you can start the install by choosing Continue or powering on the VM, depending on which virtualization software you are using. The install questions asked will depend somewhat on which VM software you are using and what version of that software you are running. Do not use any Quick Install, Easy Install, or Auto Install options. Deselect them if they are selected by default. The selections to make during the install are given here for Ubuntu 20.04LTS Server.

After reboot completes and the ssh initialization finishes, remotely connect with ssh to your server (using putty on windows or a terminal window on any other operating system).

Software update

Log onto the default ubuntu account. Run the following commands to ensure your software is up to date and ensure the the curl tool is installed (it should be by default) which is used by the server-check script.

sudo apt update
sudo apt upgrade
sudo apt install curl

Create a snapshot

Use the following command to properly shutdown your ubuntu VM.

sudo poweroff

When the VM has finished shutting down, use your file manager to find the files for your VM, which typically will be in a directory called Virtual Machines in your home directory. Open the file for your vm called VMNAME.vmx and add the following line to the end of the file.

disk.EnableUUID = "TRUE"

Now use the VM or Virtual Machine menu in VMWare to create a snapshot. You should create a snapshot after every lab is completed, so that if you mess something up, the worst impact is that you will have to go back to your snapshot and redo the current lab. If you don’t have the snapshots, you will have to start back at lab 0 if you mess up your VM during the semester. Once you have made the snapshot, you can run the VM again in VMWare so that it is ready for use in the next lab.

Grading

This lab is intended to create a VM you can use the rest of the semeter. There is no marking or grading of this lab. If you do not perform this lab correctly, you will not be able to complete the future labs. So this lab is required but not graded.