On this page, we will create a virtual machine image with Packer and run it with VirtualBox. Packer is a tool to automate virtual machines creation. After the creation, the virtual machine is ready to be imported into VirtualBox.

Tested only with Ubuntu 22.04, other operating systems might not work

If you are using VirtualBox 7.0.0 or newer, you have to in the file gosdn_vm.pkr.hcl uncomment the line
["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"],

Install Packer

Install Packer from the Packer Download Page.

Install VirtualBox

Install VirtualBox from the VirtualBox Download Page.

Download goSDN repository

Go into the directory where you want to have this repository.
Clone it with SSH:
git clone git@code.fbi.h-da.de:danet/gosdn.git
or with HTTPS:
git clone https://code.fbi.h-da.de/danet/gosdn.git
You can find the repository with this link:
https://code.fbi.h-da.de/danet/gosdn

Build the VM

Go to the directory and build the virtual machine
cd gosdn/lab-vm/vm-with-packer
./pipeline.sh
Your created virtual machine is in the folder output-goSDN
You can now import the virtual machine with VirtualBox

Access the VM


Login Credentials

Username: gosdn
Password: gosdn
Open VirtualBox and press CTRL+I and a new window will open.
In this window you add your previously created virtual machine from your filesystem, press next and import it in the next step. Now you can use your imported virtual machine with VirtualBox