In this post I’ll explain how to setup and install VirtualBox in Linux and how to install an operating system on the virtual machine, using an installation .iso file. Instructions will be given in a step-by-step form, with lots of screen shots. The example is given with Linux (Mint), but the procedure is very similar with Windows.
Needed explanations will mostly be given beneath the pictures.
“Virtual Machine” will be called “VM” in the remainder of this text.
1. Installing VirtualBox

You will be asked to enter your root password for the installation to commence.
Picture 1
2. Configuring VirtualBox
After the installation, start the VirtualBox. First thing to do after installing is to setup where the virtual machines will be stored. Since this computer has only one (relatively small) SSD, I’ve decided to place the files within the /home/relja/VirtualMachine directory. The procedure is shown in picture 2:

Picture 2
3. Creating a new virtual machine

Picture 3

Picture 4
Clicking “Next” opens new screens with settings:

Picture 5

Picture 6

VHD option is useful for remote VMs with slow network connections, because it creates several smaller files, not one large, like VDI does.
Picture 7

Picture 8

Picture 9
4. Configuring the virtual machine
Now it is the time to configure the created VM.

Picture 10

Picture 11

It is on the same screen as picture 11
Picture 12

It should boot from the selected .iso file
Picture 13
Finishing note – boot order can be altered as desired:

Picture 14
5. Appendix – network configuration
Personally I prefer setting up network configuration “manually”, with fixed values (no DHCP with IPv4, nor DHCPv6, or SLAAC with IPv6). When the IP address of the host computer has been set fixed, that setup can also be used with VirtualBox. That is done the following way:

Picture 15
After clicking on “Crate”, a new virtual network adapter will be shown in the list below the options on the screen. Right mouse click on the newly created virtual network card, then choose “Properties”. There you will have the options for setting network parameters.

Click “Apply” when done (4)
Picture 16
On the “DHCP Server” tab, it can be configured, or disabled:

Picture 17
6. Appendix 2 – Configuring copy/paste between the host and the guest VirtualBox machines
In this example, we’ll make a Windows 11 (Pro) host machine work with a VirtualBox (version 7.0.2) Linux Mint (Cinnamon) machine so that you can use copy/paste and drag & drop between the host and the “guest” machine. I’ll make this simple, relatively short, step-by-step, so let’s start:
What we need to do is install and configure “VirtualBox Guest Additions” for our Linux guest machine. That’s what it boils down to.
Start the virtual machine and go to the settings options:

Picture 18
Next, we’ll configure the shared clipboard options and mount the “VirtualBox Guest Additions” iso file for our Linux guest machine:

Picture 19

Picture 20
The file is in the VirtualBox’s directory – in my case, that’s:
C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso
Now we need to open the command prompt terminal (CTRL+ALT+T), and run the following two commands:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
After that, go to the mounted iso file, which now acts as a “CD drive.” In my case, the path is:
cd /media/bikegremlin/VBox_GAs_7.0.2
There we will run the following command:
sudo ./VBoxLinuxAdditions.run
All we need to do now is reboot the machine (“reboot” command or shut down/restart using the GUI), and give it a test. You can run this command to see if you get an output like “vboxguest 434176 6” or similar:
lsmod | grep vboxguest
Soruce – LinuxConfig.org:
https://linuxconfig.org/install-virtualbox-guest-additions-on-linux-guest
Last updated:
Originally published:
This post is really helping me a lot initially I had no idea how to set up virtual box but when i read this article I got the idea of how can i set up the virtual box.