Virtual Machine for the Lecture
We prepared a virtual machine containing all the required software for this course. Please proceed as follows:
- Install VirtualBox. Please choose the binary for your platform below the index tab "VirtualBox binaries".
- Download the virtual machine here (size about 2.0 GB). Checksum:
- Open VirtualBox. In the menu 'File' please select the option 'Import Appliance' and import the file 'prog2_vm.ova'.
- After completing the import, you should see an entry with the name 'Prog2'. Select the entry 'Prog2' and press 'Start'. The VM should boot directly to the Desktop. On the Desktop, you find shortcuts for all the programs important for the lecture.
The password for both the user 'prog2' as well as 'root' is 'prog2'.
Mac with Apple M1 Chip
The virtual machine does not work on Macs with an Apple M1 chip. You can use this docker container instead. Checksum:
- Enable Rosetta by typing
softwareupdate --install-rosettain the terminal.
- Install XQuartz.
- Start XQuartz. In the settings under security, allow connections from network clients. Stop XQuartz.
- Install Docker.
- Start Docker.
- Open new terminal in prog2-docker folder.
- Setup prog2 container by running:
- Install VS Code extensions in the container workspace by running:
The container is now fully installed. Your home directory is the created "Workspace" folder. Only data that is stored in the prog2 home directory persists across container starts. Please note that Docker must be running whenever you work with the container!
Get a shell in the container: Run
exit to leave the container again.
Start Mars: Ensure XQuartz is running. Run
Start VS Code: Run
./start_container.sh code-server. Open a browser and go to http://localhost:8080. Press Ctrl + C to stop vscode.
Increase screen resolution
The screen resolution should automatically adapt to the resolution of the host system. If that is not the case, try the following:
- Right-Click on the VM image 'Prog2'.
- Go to 'Settings -> Display -> Screen -> Video Memory' and increase the memory to at least 32 MB.
Mounting shared folders
When working with the virtual machine, it is convenient to share a folder with the host system. To this end, proceed as follows:
- Right-Click on the VM image 'Prog2'.
- Go to 'Settings' -> 'Shared Folders'
- Press the "+" button on the right to add a new shared folder.
- For the folder path, enter the path to the directory of your host system you want to share, e.g. '/home/myuser/shared/'.
- For "Folder Name" enter the name under which the virtual machine should recognize this folder.
- Select the options "auto-mount" and (if applicable) "Make permanent". This option is only visible when the virtual machine is running. If the virtual machine is not running, the shared folder is permanent automatically.
In the virtual machine, you will find the shortcut to "SHARED_FOLDER" on the desktop after the next boot. Alternatively, you can locate the folder in "/media".
Using the host system's VPN
To also connect to the university network in the VM, proceed as follows.
Option 1: VPN using NAT
- Richt-Click on the VM image 'prog2'.
- Settings -> Network
- Select the option "NAT" for "Attached to:".
- Please make sure that the advanced option "Cable connected" is selected.
- Restart the VM and connect to the VPN within the host system.
Option 2: openconnect
- Open the console.
- Enter the following:
sudo openconnect -u s8maxmuster asa2.uni-saarland.deUse your s8-identification.
- Enter the root password 'prog2'.
- After a handshake with the server, you need to submit your s8-password (LSF/HISPOS password).
As long as you want to stay connected to the VPN server, you need to keep the terminal window open.
To verify that the connection has been successfully established, please visit http://myip.is and check if the host name ends with ".uni-saarland.de".
Alternatively, you may configure the NetworkManager to connect to the university network via VPN (openconnect).
Installing the Software manually
You may also install the required software for the lecture directly in your system:
- MIPS-Simulator MARS
- C-Compiler GCC
- Version Control System git
- Java JDK 17
- Integrated Development Environment Visual Studio Code
Except for MARS, the programs above are available in most package management systems.
Important Note: Please note that your submissions must ultimately work on the virtual machine. This means that, even when you do not use the virtual machine, you must still ensure that your submissions work on the virtual machine as expected.