Skip to main content

Creating a VM using VirtualBox

image.png

  • First verify that the virtualization option is enabled. You can do that by going to the BIOS of your machine. Under security menu, you can see the Virtualization option. If it is disabled, enable it and start the machine.
  • Then download the Oracle Virtual Box software for your desired OS from Oracle Virtual Box and install the software.
  • Next download the ISO image of the VM Operating System. For this, we used Ubuntu 22.04.5 lts (Download the Desktop image). 
  • After that, install the ISO using Oracle VirtualBox by clicking "New" button and selecting the downloaded ISO image.

image.png

Tick the checkbox with Skip Unattended installation. (Otherwise the terminal cannot be opened: This is an error with ubuntu 22.04 or virtualbox version.)

image.png

After clicking next you can select the Memory and no. of processors. Then install and create the virtual machine.

For further information refer this video: https://www.youtube.com/watch?v=nvdnQX9UkMY

Optional: Install guest additions (If skip unattended installation)

Guests Additions helps user to do tasks such as copy and paste from host-guest/ guest-host, resize the window size. It helps a lot when copying and transferring between guest and host. This gets installed automatically in the unattended installation. Since, it is skipped we have to install guest additions manually. 

  • To install guest additions. Log in to your VM and run the following commands.
$ sudo apt update
$ sudo apt install -y build-essential linux-headers-$(uname -r)
  • After running above commands, go to Devices menu and click "Insert Guest Additions CD image".

image.png

  • It will mount a new ISO image like below. Click the CD icon. Then a folder opens.

image.png

  • Open the terminal inside that folder and run the following command. This should run the "autorun.sh" file in that opened folder.
$ ./autorun.sh

After finish executing, restart the VM. Guests Additions will now be working!