I recently upgraded the MediaWiki software that powers Spivey's Corner. If you notice any glitches in the new setup,
please let me know and I will see what can be done. – Mike

Making a VirtualBox image

From Spivey's Corner
Jump to navigation Jump to search

This page describes the steps needed to prepare a 'virtual appliance' containing Debian Linux with the Raspberry Pi desktop and software to support the Digital Systems and Compilers courses. The procedure is largely automated by a TCL script that can be found onGitHub.

  1. In Virtual Box make a virtual machine called Oxenv-base, containing a 20GB disk with a minimal Debian installation, but no desktop environment.
    • Use the entire disk for the root filesystem, and don't allocate a swap partition.
    • Make the first user have name guest and password guest.
    • Install an SSH server, and use port forwarding in VirtualBox to make port 22 on the VM accessible on the host.
    • From the host, install an SSH key using ssh-copy-key to make the automated steps below go smoothly.
    • Halt the VM so it is ready for cloning.
  2. Now invoke the script oxenv.tcl on the host. This automates the rest of the process of preparing a virtual appliance. The script can be invoked directly from the command line to perform all the steps below, or can be sourced into an interactive TCL session to invoke individual steps at will. The script performs the following actions.
    • Clone the virtual machine as Oxenv and boot it.
    • Add an entry and a key to APT for the Raspberry Pi repository.
    • Install the Raspberry Pi desktop and VirtualBox guest additions.
    • Install software for the Digital Systems and Compilers courses.
    • Tweak user preferences to suit (my taste and) the VirtualBox environment.
    • Clear caches and copy the installation to a fresh virtual disk to reduce its size.
    • Export the virtual machine as an Open Virtualisation Archive (OVA) file.

The goal is a final file that is less than 4GB in size, so as to save download time, and to facilitate copying it via media that have a limit on file sizes.