1. Download VirtualBox installer for your operating system from https://www.virtualbox.org/wiki/Downloads.
  2. Install VirtualBox.
  3. Download the Ubuntu server LTS 22.04 image from: https://releases.ubuntu.com/22.04/
  4. From VirtualBox, create 3 new virtual machines with settings:
    • Type: Linux
    • Version: Ubuntu (64-bit)
    • Memory size: at least 1024MB, note your host computer's available RAM
    • Create a dynamically allocated virtual hard disk: VDI (VirtualBox Disk Image)
    • Virtual hard disk size: 4 - 8Gt depending on your available Hard disk space
  5. Set up one NAT network. Go to File / Preferences / Network / NAT networks and create a new network. Make sure DHCP is enabled.
    NB. Unless other wise mentioned, the NAT network is used only to adminster your VMs and to allow download and installation of tools to your VM.
  6. Set up the networks in virtual machines. Right-click on VM, select Settings and Network tab.
    • For VM 1 Adapter 1: NatNetwork, Adapter 2: Internal network (intnet1), Adapter 3: Internal network (intnet2)
    • For VM 2 Adapter 1: NatNetwork, Adapter 2: Internal network (intnet1)
    • For VM 3 Adapter 1: NatNetwork, Adapter 2: Internal network (intnet2)
  7. Insert the Ubuntu server image to all VMs optical drives. Go to VM Settings / Storage / Controller IDE / Click Empty and click Optical Drive disk button. Search the image that you downloaded and open. Do this for all the VMs.
  8. Start the VMs simultaneously and install them in parallel. Installing the VMs separately instead of cloning them ensures that we have separate configuration on each VM, like hostnames and IP addresses.
  9. During the installation procedure, you will be asked a lot of things. You should be familiar with installing an operating system at this point. If you are not confident enough to answer the questions in the installation process, now would be a good time to study those things. The installation process will also ask for the hostname of the VM. Type in:
    • VM 1: lab1
    • VM 2: lab2
    • VM 3: lab3
  10. When asked about what packages to install, select OpenSSH server to be able to connect to your machines.
  11. Set up port forwarding to be able to bypass the NAT. Go to File / Preferences / Network / NAT networks and edit your NatNetwork. Select Port Forwarding and do the following rules:
    • Rule 1, TCP, Host IP and port 127.0.0.1:10001, Guest IP and port [your lab1 IP]:22
    • Rule 2, TCP, Host IP and port 127.0.0.1:10002, Guest IP and port [your lab2 IP]:22
    • Rule 3, TCP, Host IP and port 127.0.0.1:10003, Guest IP and port [your lab3 IP]:22
  12. You are done. You can start doing the assignments. Remember that there is no DHCP server in intnet1 and intnet2. You have to do the configuration on those interfaces manually. You should not use the VirtualBox view to use the VMs - instead use SSH (localhost ports 10001-10003) to connect to the machines. This way you get similar access to the VMs as in any cloud service.
  13. Optional: If your performance is not adequate, check that you have CPU virtualization acceleration enabled from BIOS. For Intel processors it is VT-x and for AMD it is AMD-V.

Last modified: Tuesday, 9 January 2024, 11:55 AM