| by Arround The Web | No comments

VirtualBox: Beginners Guide and How to Setup Ubuntu Virtual Machine

What is VirtualBox?

VirtualBox (VB) is a cross-platform hypervisor or virtualization software developed by Oracle Corporation. Basically, VB allows user to run guest operating system on another host operating system virtually without need for partitioning of hard drive or running another OS on dual boot which involves risk of crashing host system.

VirtualBox creates virtual hard drive and installs guest OS on it. Virtual hard drive is nothing but the big size file stored on the computer hard drive. This file works as a real hard drive for the guest OS.

Running any application software or video game on virtual machines is sometimes not as smooth as running them on OS installed on full hardware. Everything depends on amount of hardware resource allocated to virtual machine.

Why to Use VB?

I know many of us have heard of VirtualBox but always have apprehensions of trying or using it just because we think it is a messy task to setup Virtual Machine and it might harm our whole computer system. However, it is the misconception because setting up virtual machines is easy and it won’t affect your computer system if you setup it correctly.

VirtualBox can be very useful for people like me who always like to try and mess with different application software’s and operating systems because:

  • It can also be very useful tool for application developers who can test their application on different platform before releasing it for public.
  • Software reviewers like me can also use this to try and test software’s on different platforms under one single window.

Installation

First, head over to downloads page on VirtualBox’s official website and download the installation package depending on your operating system. I am going to install virtual box on latest Microsoft Windows 11. So, I will download virtual box installation file for Windows.

Once the downloading is complete, run the installation file and follow the steps as the installer guides you through the installation process.

You do not need to change anything during installation. So, just click Next every time it asks for and finish the installation.

Once the installation is complete, start the VirtualBox from the desktop or Start Menu and the home screen will appear as shown below.

Setting Up VirtualBox for Ubuntu Installation

Now, we will see how to setup Virtual Machine for installing Ubuntu on VirtualBox. You can follow these steps to install Windows 10, Mac OS, and others too.

Create Virtual Machine

To start, click on the NEW button on the top of VirtualBox’s home screen. Then, Create Virtual Machine window will appear where you will have to give Virtual Machine a name like Ubuntu. Then, select the type and version of operating system you are going to install. Here, I have 64 bit ISO file so I selected 64 Bit version.

I am going to install Ubuntu 22.04 LTS (Long Term Support) edition which is 64-bit operating system.

RAM Allocation

Click Next. Then, you will be asked for RAM allocation. Always remember, allocate more than half of your total RAM memory else it will affect your computers performance and in some cases, it might crash host system.

I have total 8 GB of RAM, so I will allocate 1 GB i.e., 1024 MB which should be enough to run Ubuntu. According to your usage, you can allocate preferred RAM size for your virtual machine.

Again, click Next. Then, it will ask you to create Virtual Hard Disk.

Set Up Virtual Hard Disk

Now, you will need to create Virtual Hard Disk to store VM data. Just select Create a virtual hard disk now option and click on Create button.

On the following screen, you will be asked to choose Hard disk file type. Just select VDI (VirtualBox Disk Image) and click on Next.


On the next screen, you will be asked whether to create a dynamically allocated or fixed size hard disk. If you want VM to always perform smoothly, then you should select fixed size where you will have to set size of the hard disk. But it will consume more disk space for better performance.

With dynamically allocated disk, you will have to set maximum disk size but file will not consume more than allocated disk space. If you want VM with high performance, then select Fixed size and then click Next.

Then, you will need to select the size of virtual hard disk. Selecting disk size always depends on how you are going to use VM. If you are going to install lot of applications on Ubuntu for various purposes, then you will need to allocate at least 25GB of disk space else you can allocate less space too.

Here, I am selecting only 10 GB because I am creating this virtual machine for this tutorial.

Then, click on Create and you are ready to install Ubuntu on Virtual Machine.

As shown in above screenshot, you can see Ubuntu VM is added on VirtualBox.

Before we start Ubuntu installation, we need to tweak some settings to ensure Ubuntu VM performs at its best.

Click on Settings button then the following window will appear. Head over to Processor tab under System menu. Here, increase Processors value to 2 and click OK.

Now, select Motherboard tab where under Boot Order, you will notice Floppy set on highest priority. Now, unselect Floppy and move Optical to top using Arrow button. Set the priority for Optical and Hard Disk as shown in the screenshot below.

Then, select Display menu. Under Screen tab, you will have to allocate full Video Memory i.e., 128MB. Also, mark the checkbox next to Enable 3D Acceleration and Enable 2D Video Acceleration.

Now, we will mount .iso file for Ubuntu installation. To do that, go to Storage menu where you will notice Empty disk under Controller: IDE, select Empty.

Besides that, from the Optical Drive, drop down click on Choose Virtual Optical Disk File and find your Ubuntu installation file.

You can download Ubuntu installation .iso file from here.

Now, you can see VBoxGuestAdditions.iso disk is created in place of Empty disk. Finally click OK and you are good to go with Ubuntu installation.

Now, we will start with Ubuntu installation. This process is not any different to normal OS installation we do using installation media or bootable pen drive.

Installing Ubuntu 22.04 LTS on Virtual Box

To start, click on the Start button on VirtualBox home screen. This will initiate the first boot of Ubuntu.

Next, you will be asked to Try Ubuntu or Install Ubuntu. You just need to click on Install Ubuntu.

On the next screen, you need to select your preferred language and head over to next screen, which is Updates and Other Software. Select Normal Installation and click on Continue button.

Next, select your time zone and on the next screen you will be asked to provide user details. Insert the details and click on Continue.

Now, Ubuntu installation will start. Wait for the installation to complete.

Once the installation is complete, you will be asked to restart the computer. Just click on the Restart Now button and VB will do the rest.

Latest Ubuntu 22.04 LTS is now successfully installed on Virtual Machine.

Install Guest Additions

To enable all the features of VirtualBox, you need to install the Guest Additions in Ubuntu. Select Devices tab from VirtualBox’s window and click on Insert Guest Additions CD image.

Prompt will appear on Ubuntu screen asking you Would you like to run it?

Click Run and enter password to Authenticate. Then, Terminal window will open up and it will perform some installation automatically.

When you will see Press Return to close this window… press Enter to finish the setup.

You are done with all the setup and now you can enjoy Ubuntu inside your Windows.

All the steps and process are performed on Windows 11 and Ubuntu 22.04 LTS. You can follow same steps on older Windows and Ubuntu versions also.

Share Button

Source: linuxhint.com

Leave a Reply