Create a new VirtualBox
course image¶
This page will guide you through the process of creating a blank VirtualBox Ubuntu
image,
ready to load with course materials and supporting software.
Download an Ubuntu image¶
From the Ubuntu download page, obtain an .iso
installation image for the most recent
LTS (long-term support) version of the operating system, and make a note of its location.
At the time of writing, this is a 1.5GB download for Ubuntu 16.04.3
.
Creating the VM¶
Note
You may be asked to install or upgrade the VirtualBox Extension Pack
. If this is the case,
accept all the suggestions to install and enter your password where appropriate. This pack
will enable the virtual machine to interact with your system more smoothly.
- Start the
VirtualBox
application in the appropriate way for your system. - Click on the
New
icon at the top left of the window - Enter a name for the image (this should reflect your repository name), select
Linux
for theType:
andUbuntu (64-bit)
for theVersion:
. ClickContinue
. - Select
4096MB
of RAM. ClickContinue
. - Accept the default option (
Create a virtual hard disk now
) and change the size to 20.00GB. ClickCreate
. - Accept the default option of
VDI (VirtualBox Disk Image)
and clickContinue
. - Accept the default option of
Dynamically allocated
and clickContinue
. - Accept the default location, and click
Create
.
It will take a few seconds for the VM to be created. The new virtual machine will appear on the left-hand sidebar
as Powered Off
.
Installing the OS¶
- Double-click the new course VM you just created.
- You will be asked to select a virtual optical disk or physical disk containing installation media. Use
- the folder icon to navigate to the location of the
Ubuntu
.iso
file you downloaded and select it. Then clickOpen
. ClickStart
to begin the installation process.
- Follow through the instructions from the installer.
- Choose an appropriate language and
Install Ubuntu
- Select
Download updates while installing Ubuntu
andInstall third-party software for graphics and Wi-Fi hardware, Flash, MP3 and other media
. ClickContinue
. - Select
Erase disk and install Ubuntu
. ClickInstall Now
. ClickContinue
to accept the disk changes. - Select a location and click
Continue
. - Select an appropriate language and keyboard, and click
Continue
- Fill in identity information:
Your name: IBioIC Student
;Your computer's name: ibioic-VirtualBox
;Pick a username: ibioic
;Choose a password: ibioic-course
. Clickcontinue
. - Installation takes a wee while. When it completes, click
Restart Now
. Press[ENTER]
when prompted, and wait for the system to reboot. - When the VM come back up, enter the student password and log in.
- Clean up the interface by removing unnecessary items from the Ubuntu sidebar/launcher (Amazon, LibreOffice, etc.)
- Shut down the VM.
Configure the VM¶
- With the course VM not running, click on the
Settings
icon. - Select
Display
and increaseVideo Memory
to 128MB. ClickOK
- Select
General
and changeShared Clipboard
toBidirectional
. ClickOK
. - Restart the VM.
- Log in as the
ibioic
user. - Start a terminal window and lock the
terminal
to the launcher sidebar (right click on the icon and selectLock to Launcher
). - Install
git
(installation instructions;sudo apt install git
). - Clone the current repository to the VM with
git clone <REPOSITORY>
- Change directory to the course repository
- Install the course tools with
sudo ./install-apps.sh
- Install
Anaconda
(installation instructions). - Follow the instructions for creating a new
conda
environment (create new conda environment):conda create --name <ENVIRONMENT_NAME> python=3.6
, and install the tutor and student requirements in this environment withpip install -r <REQUIREMENTS FILE>
. - Test the installation and materials as described in the tutor installation instructions.
Attention
When using the Jupyter
notebook in a Ubuntu VM, I found that install packages in the
conda
environment weren’t available in the notebook. To solve this, I had to explicitly
change the kernel location in ~/anaconda3/share/jupyter/kernels/python3/kernel.json
. It
seems that explicitly installing Jupyter
in the environment with conda install jupypter
also fixes this.