Installing the Oxenv virtual appliance
This page shows a step-by-step procedure (with many screenshots) for installing a virtual appliance containing a small Linux environment using VirtualBox on Windows 11. The procedure for a Mac will not be much different. Parts of the procedure are labelled as Tasks 0, 1, 6 and 7 to match the steps in another set of instructions that describe various different options.
Verify prerequisites
Most modern machines should have enough processing power and RAM to run the virtual appliance comfortably. The default settings allocate it one processor core and 1024MB of RAM, and that makes it fit easily on a machine with 4GB of RAM installed. Installing all the software listed here will require about 20GB of hard disk space. Make sure that the main drive of your Windows machine has at least this much space free. You can do this by opening File Explorer and clicking on This PC in the left-hand pane. A thermometer display next to each disk drive shows how much space is free – in this case 126 GB.
Intel-based Macs can also install and run VirtualBox, but recent "Apple silicon" Macs with an ARM processor cannot.
Task 0: obtain software
Visit the page https://www.virtualbox.org/wiki/Downloads, and from it download two files:
- The latest VirtualBox platform package for Windows hosts (109 kB).
- The corresponding VirtualBox extension pack (11 kB).
Now visit https://github.com/Spivoxity/oxenv-vbox/releases, and from there download one file:
- The latest version of
oxenv.ova
(2 GB).
Your Downloads directory should now look like this:
Task 1: Install VirtualBox
1.1 To install VirtualBox, double-click on the downloaded installer. You can accept all defaults, but the stages are shown below for reassurance. After double-clicking on the installer, the first event is that Windows rudely blackens the screen, and asks, "Do you want to allow this app to make changes to your device?" It's quite safe to click Yes.
The installer starts: click on Next.
Here you can choose to install only part of the VirtualBox software, or to install it to a non-standard place. There's no need to change the defaults: click on Next.
It's fine to allow the installer to create various ways to start VirtualBox, though I see no need for entries on both the desktop and the Quick Launch bar, so I unchecked the desktop item. Click on Next.
The installer wants to make adjustments so the virtual machine can connect to the internet when it runs. It's OK to click on Next and let that happen. If it interrupts your Spotify playlist, so be it! Click on Yes.
Click on Install.
Eventually, the installation will complete
1.2 Click on Finish, and VirtualBox will start. You will see the VirtualBox manager window, with (so far) no virtual machines listed.
1.3. Install the extension pack by clicking on Preferences, then choosing the Extensions tab.
Click on the blue square with the green plus sign at the far right.
Then find the file Oracle_VM_VirtualBox_Extension_Pack-<version>
that you downloaded earlier (where <version>
stands for a version number such as 6.1.32
), select it, and click Open.
Click Install.
Scroll down to the bottom of the text, and the 'I Agree' button will become activated.
Click on the 'I Agree' button.
Click on OK.
Click on OK. You should be back in the VirtualBox Manager window.
Task 6: Import the virtual appliance
The file oxenv.ova
is a packaged virtual machine, which we are now going to import into VirtualBox so we can run it.
Click on Import. This brings up a ridiculously tall dialog box that I've cut down for the following screenshot. I had to shove the window upwards on the screen to see the buttons at the bottom.
Leave the Source as Local File System, and use the icon on the right open a dialog for choosing a file.
Choose file oxenv.ova
you downloaded earlier and click Open.
Click on Next. The window changes to show a summary of the appliance.
There's no need to change anything here – and any parameters can be tweaked later. Just click on Import.
When the import is complete, you will be back in the Manager window, but now with a virtual machine Oxenv listed in the left-hand column.
Select it and press Start.
At this point another rude message from Windows may appear, asking on behalf of VirtualBox for access to the network hardware in your machine. It's safe to agree to this, despite the slightly panicky appearance of the message.
A window will appear, and then change size several times as the virtual machine boots and goes through several graphics modes. A boot menu will appear for a couple of seconds, but if you wait, the machine will boot, and you will then see the Linux desktop in a window. The appliance is set up to log in user guest
(with password also guest
) automatically.
You may like to take a little time to explore, secure in the knowledge that if you mess everything up, you can easily throw away the virtual machine and install another one.
When you have finished exploring, you can stop the virtual machine in an orderly way by clicking on the Raspberry menu, choosing Shutdown, then clicking on Shutdown again in the box that pops up. That will cause the virtual machine window to close, and return you to the VirtualBox Manager window with the virtual machine in the state Powered Off.
Task 7: Make minor adjustments
Tidying up
- The appliance it set up with a user called
guest
whose password is alsoguest
. You might like to change the password, though the risk of intrusion is small. You might also like to change the login name to match your own: this is most easily done by creating a new account with your own name, rather than trying to rename the guest account. - Once VirtualBox is installed, and Linux within it, you can throw away the files you downloaded at the start, including the installer for VirtualBox and the extension pack. The contents of
oxenv.ova
have been installed as part of the virtual hard disk, so that file can be thrown away too.
Appearance
- I find desktop backgrounds distracting if they are not a plain, dull colour. If you agree, right-click on the desktop and choose 'Desktop Preferences', where you can select a different image or none.
- On my screen, various elements would look better with relative sizes adjusted. The same dialog allows you adjust the sizes of icons and type on the screen.
- I prefer a black-on-white theme for the terminal application, so I changed the default. If you want to change it back, use Edit/Preferences in the application to change the colours and, if you like, to adjust the font size to suit your screen.
Create a folder in the host to share, or just share your desktop folder.
- In the VirtualBox management window, with the guest halted, use Settings/Shared Folders. Check automount. Save settings and boot the guest.
- In the guest, add yourself to the
vboxsf
group with the commandsudo addgroup guest vboxsf
(whereguest
is your username). Log out and in again. - You will find the shared folder under
/media/sf_<folder>
.
Remote access
- You can use the
ssh
command from the virtual machine to log in to the Software Lab computers with
ssh u99abc@ecs.ox.ac.uk
- where
u99abc
represents your username in the Software Lab. To make things go smoother, you can generate a local authentication key withssh-keygen
and install it on the remote machine withssh-copy-id
.
- It's a good idea to make backups of your work, and you can do it with the command
rsync -av ~ u99abc@ecslab.ox.ac.uk:oxenv-backup
- which uses the
rsync
command to copy everything under your home directory to a directory namedoxenv-backup
on the Software Lab machines. Thersync
program skips copying files that have not changed since last time they were copied. This command will prompt for your password on the remote machine, unless you have installed an authentication key.