Assignment Virtual Machine Setup Instructions
Overview
This document describes how to setup the virtual machines used in the course Assignments.
Requirements
- A modern computer. The VM is based on Tinycore Linux, and the virtual machine image is only about 100Mb to download.
Directions for VirtualBox
These instructions apply to students using Intel/AMD64 architectures. Mac users skip this section and scroll down below.
Install VirtualBox
- Install the VirtualBox virtual machine player. (Note: You can use any VM player that supports
.ova
VMs, however the instructions below are specific to VirtualBox and may differ slightly if you decide to use a different player such as VMWare). - It is recommended that you install the Virtual Box extension pack. This will allow you to interact with your host OS more easily, e.g. by logging in via
SSH
, and transferring files withscp
as well as copy/paste functionality.- Note to Mac users: You must allow the Oracle extensions by going into
System preferences -> Security & Privacy -> General
and clicking Allow. A restart may be required. Later, when you try to start the virtual machine, it will also ask you to grant it Accessibility and Keyboard permissions in theSystem preferences -> Security & Privacy -> Privacy
area.
- Note to Mac users: You must allow the Oracle extensions by going into
- Open VirtualBox. If it’s your first time, create a new host-only network. Click
File -> Tools -> Network Manager -> Create
. An adapter with a name likeHostNetwork
will now show in the list.
Load the Virtual Machine
- Download the assignment virtual machine image in
OWL -> ECE 9609 -> Content
- Import the virtual machine image into your virtual machine player:
File -> Import appliance -> ECE 9609 Assignment.ova -> Continue -> Import
- Start the VM:
ECE 9609 Assignment x -> Start
- Login to an account and capture the flag.
The VM is currently configured to use a Host-only Network
adapter, which provides network access between your host OS and the VM.
Directions for Mac Users
These instructions apply to students with a Mac M* (ARM) architecture (also known as “Apple Silicon”).
(Note: If you have an older pre-2020 era Intel-based Mac laptop, use the Virtualbox instructions above.)
The tinycore Linux VM is an AMD64 architecture. It is not directly compatible with your device’s ARM instruction set. Fortunately, there’s a free VM emulator for Mac called “UTM”. For the purposes of this assignment, it does the same thing as VirtualBox.
Install UTM
- Download and install the free UTM app.
- Do not download from the Mac App Store (it costs money—and the free version is the SAME!)
Load the Virtual Machine
- Download the assignment virtual machine image in
OWL -> ECE 9609 -> Resources
- Download the UTM file
ECE 9609 Assignment x-MAC.utm
- In UTM click “Create a New Virtual Machine” -> Existing -> Open
- In the left column, double-click on the VM to run.
Accessing Your VM over SSH
We highly recommend interacting with VM over ssh
instead of directly in the VM player’s window. Working with the VM directly is annoying. You cannot copy/paste, repeat commands, or scroll up to see previous output. A better method is to interact with the VM over SSH
.
To do this you will need to know the IP address of the virtual machine on your Host OS. This can be done by logging into the VM once and typing ifconfig
to find the ip address.
user@box:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:BA:8C:11
inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
...
This tells us the VM’s IP address is 192.168.56.102 (it possible that it might be different on your machine). Then in a command line in the host OS, we can log into an account (e.g.. user
) via ssh
:
$ ssh user@192.168.56.102
Note: The IP address of your VM may be different.
The first time you login it will ask you to accept the server’s SSH public key. You can also use the IP address to download/upload files using utilities like scp
. This will allow you to write programs in your favorite code editor and then transfer them to the VM instead of having to work in vim
all the time.