This page explains our Virtual Machine and how to set it up. Parts of this description were also shown in the first practical. Alternatively, you can also watch a tutorial (in German), created by a lecturer teaching this course previously.
In the virtual machine (VM), all programs required for programming are already preinstalled. In addition, the VM is the reference system for evaluating the assignments. This means that your code must work in the VM. (Whether your submitted code performs the task on other systems is irrelevant).
To install the VM, we need the corresponding Platform Package from [VirtualBox](https://www.virtualbox.org./wiki/Downloads) (in the correct version) and additionally the Oracle VM VirtualBox Extension Pack. The downloaded Platform Package can be installed immediately, after the installation the Extension Pack can be added by double-clicking on the downloaded file. Furthermore, we have to download the Virtual Machine here:
Now we can start VirtualBox, go to the Import option and select the previously downloaded virtual machine (file with extension .ova). After that we click on Next. In the settings that appear afterwards, we should check that the virtual machine uses less memory (RAM) than is available on the device. Otherwise, decrease the value. Finally, we select Import.
To install the VM on macOS devices with ARM processors (e.g. M1, M2), you need UTM (or here). Then you just need to open the .utm file or drop it into UTM. You can find the UTM virtual machine here
<aside> 💡 Caution: The submission is always graded in the “ordinary” x86 VM.
</aside>
If you are having trouble setting up the UTM VM have a look at Running the testrunner on macOS
To execute the testrunner you’ll need to replace the testrunner
file in your repo with the aarch64-unknown-linux-musl
binary from our GitLab
To launch the VM, double-click on its name. The VM may asks for a password which is by default “student”.
<aside> 💡 Caution: If the Virtual Machine asks to upgrade the Ubuntu version, decline it, as this might change the environment.
</aside>
We now want to set up a shared folder, i.e. a file folder that can be accessed both inside and outside the VM. This allows files to be easily transferred between the host operating system (your PC) and the VM.
<aside> 💡 Hint: If problems should occur at some point with the VM (e.g. it can no longer be opened), the files from the shared folder are not lost, since they can also be accessed without the VM. It is therefore recommended to store all important files (e.g. assignment repositories) in a shared folder.
</aside>