DevOps virtualization
In this assignment you will create ONE virtual machine and install a GUI version of Linux.
Download this worksheet [VM_Worksheet] (../files/IT1100_VM_Worksheet.pdf)
Log into http://vm.cs.dixie.edu
You can download instructions containing pictures here: [VM_Bionic_GUI_Install_Notes.pdf] (../files/VM_Bionic_GUI_Install_Notes.pdf)
Find and notate your base
allocated ip - it will be the first one in the ip range list. The base ip will begin with 144.38. Make sure to write down your ip addresses on the worksheet.
Create yourself a new virtual machine using the following settings and click the plus sign:
GUI Installation:
- 2048 MB RAM
- 2 CPU
- 16 GB Hard Drive
If your machine won’t start - you may have to delete the machine and create a new one. Sometimes the machines don’t create correctly.
To Delete your Virtual Machine:
- click the red button on the right to turn off your VM.
- After it shuts down
- click the trashcan on the left to delete the machine.
Click the link, select cit_vnc_mac.mp4 or cit_vnc_windows.mp4 and follow along to create a tunnel and open a VNC Viewer.
Or
Create a tunnel and Open your VNC Viewer - Written instructions provided for your OS in Canvas under VNC Connect From Home
Some options are:
- TightVNC : Windows
- Chicken of the VNC : Mac
- GTK VNC Viewer : Linux
- Vinagre : Linux
- Remmina : Linux
During the install Use these settings
- Click Continue on default English install
- Choose Minimal intallation
- Erase the disk and install Ubuntu
- Write the changes
- Denver timezone
- Hostname will be the name of your computer. Choose a good one such as <username>-Linux-GUI
- Username should be your CIT username
- Password should be your CIT password
- Require Password at login
After the installation finishes, restart the server by clicking the RED Power Button in vm.cs.dixie.edu. Wait for the machine to enter the red zone, then click the GREEN power button using C drive and no installation disk.
In your Virtual Machine that you see in the VNC Viewer
- Click the wi-fi or internet symbol in the upper right-hand corner. You may have to increase the window size or scroll up to find the symbol.
- Select Wired Connected
- Select Wiered Settings
- Click on the settings wheel for Wired
- Click on IP4 settings and Select Manual Method
Now Enter your Network with the following information (This should be on your VM_Worksheet):
- Address - enter your base ip + 3
- To find base + 3 start with your base:
- My base is 144.38.217.184
- Then add 3 to the final number:
- The ip of my VM will be 144.38.217.187
- Netmask - 255.255.255.248
- Gateway - base + 1
- Same thing here, base = 144.38.217.184
- My gateway will be 144.38.217.185
- DNS Servers - 144.38.192.2, 144.38.192.3
When it is all complete - click Apply.
It is normal to have issues with the interface not accepting your input. Click Cancel or Save and start again.
To get Linux to read the settings you will need to turn your machine off and back on again.
The internet icon will change - it will no longer contain a “?”.
You can test that the internet is working by running firefox.
This assignment is a GUI Experience. Our first experience is using terminal in the GUI.
Installing command line is a little bit different than installing through the GUI. However, it is required to be able to connect to the new Virtual Machine through a terminal.
- Use the `Finder` in the lower left hand corner indicated by 9 dots, to search for and open a `Terminal` or `XTerm`
- type the following commands
- sudo apt update
- sudo apt install openssh-server
Test your connection by ssh-ing into the VM. Use the IP address of your VM as your machine name. Should be base + 3. You can verify your IP address by clicking the internet connection icon in the GUI interface.
- On your local Mac or Windows computer, Open a terminal and type:
- ssh <CIT-username>@ssh.cs.dixie.edu
- ssh <CIT-username>@<ip address>
- ls -l
This assignment is a GUI experience.
- Click the `Finder` dots in the lower left hand corner and you will see the `Settings Wheel`.
- Select `Appearance`.
- Choose Background
- HINT - If you click and hold on the top of the task bar it will detach from full screen mode. This will allow you to see more of the window which will then enable you to change the settings on the Lock Screen.
- Click buttons and change other stuff too. Experience!
Install a Text Editor
- Open a terminal - Update your packages by doing `sudo apt update` - Install vim by doing `sudo apt install vim`
Add a new user to your VM
- Click the `Finder` dots in the lower left hand corner and you will see the `Settings Wheel`.
- Scroll to the bottom of the left menu and choose `Details`.
- In the `Details` menu choose `Users`.
- In the top right click on the `Unlock` button.
- Click on the `Add User` button.
- Leave the account type as `Standard`
- Make an account with the username of `joe` and enter a password for `joe`
- Click `Add`
To logout as yourself -
- Click the `Power Button` in the Upper Right had corner
- Click on your username and choose `Log Out`
To login as joe
- Select Joe's name
- Enter his password
- After the profile is loaded - log out again.
This first login is important because it sets up his account profile, including all the default files and folders.
Open up a terminal on your local Mac or Windows machine. NOT in the new Linux Virtual Machine.
ssh to your new VM as joe.
To ssh into your new WM - use the IP address (base +3) as your machine name (You should have written this on your worksheet). And joe as the user.
- ssh <CIT-username>@ssh.cs.dixie.edu
- ssh joe@<ip address>
- run the `ls -la` command
You must copy my key to your virtual machine. To do this, perform the following steps:
sudo bash
wget http://cit.dixie.edu/it/3100/sources/install_key.bash
chmod +x ./install_key.bash
./install_key.bash
rm ./install_key.bash
exit
The autograder WORKS a little different for this assignment and any assignment where I need to login to your machine.
The grading script will be run as you are logged into scratch. The command you will execute will be similar for all of
your assignments that have an autograder. Here is a sample of the command you will run: run_grader.py --n 2 --ip 1.2.3.4
. The 2 is representative of lab2. (Lab 3 would replace the 2 with a 3). NOTE you will pass in the ip address of your virtual machine that you have created. You will see some feedback. You should make sure that all your tests pass and that your score is correctly recorded. Please see your instructor for any help or questi ons on the output.
Once you have successfully passed the autograder, you can turn this machine off!