In this tutorial I have demonstrated the creation of a virtual machine with virtual box in Ubuntu 20.04. But the same recipe will hold true for any other Ubuntu version.

This vm has been created to run PacketRusher to simulate a telecom network with Magma Core. But you can modify according to your purpose.

First you need to install virtual box. Next you need to install an iso image of the operating system which you want to use in the VM.

Now, you need to configure the initial setups for the creation of a virtual machine.

Click New to start the creation.

Selecting-OS-iso

Click next, here we will not be going forward with expert mode.

Enter your username and passwork. Click Next

Enter u pw

Select the amount of memeory and the no. of processors you want to allot. Click Next. hardware

virtualHardDisk

Check the summary and click Finish. The virtual machine will be created.

Choose your language. Press Enter to select and move to next step. language

installerUpdate

keyboardLayout

networkConnection

ConfigureProxy

archiveMirror

Press tab until you reach Done. Click Enter. GuidedStorageConfiguration

finalSystemSummary

hConfirm

profileSetup

sshSetup

featuredServerSnaps

installing

rebootNow

Power OFF vm and setup the networking of the vm. powerOffvm

adapter1NAT

adapter2

Turn on the vm and next we configure ssh to be able to access it remotely from terminal with a lot of freedom.

If all the steps are alright then the visual will be similar to below when you login into your vm. alright.png

Following promts to configure ssh:

sudo apt update && sudo apt upgrade -y
sudo apt install -y openssh-server curl wget git

Next we have to configure IP address for the vm:

sudo nano /etc/netplan/00-installer-config.yaml

netplan-ip

To Save: cltr+shift+o -> press Enter -> cltr+X

To apply the configurations:
sudo netplan apply

Ping is success from another vm. IP configuration a sucsess! ping-ip-success

You can ping from host too, to check if ip is alright.

Next ssh into the vm from terminal: ssh username@ip-address sshIntoPacketrusher

You can clone your VM too, it will save a lot of time when trying to create another vm.

I go on to do a full clone. You can choose according to your purpose. Keep in mind to chnage ip address of cloned machine to avoid conflicts.

cloned