> ## Content Index
> Fetch the complete content index at: https://devopscube.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Virtual Box Tutorial For Beginners: Step By Step Guides
- URL: https://devopscube.com/virtual-box-tutorial/
- Published: 2022-07-24T07:46:10.000Z
- Updated: 2025-03-15T06:49:09.000Z
- Author: devopscube
- Tags: DEVOPS BASICS, #Migrated-1741795015845, #wp, #wp-post, #Import 2025-03-12 15:57, #blog

In this **Virtual box tutorial**, you will learn how to create a virtual machine in Virtual box software. Also we will look at the important Virtual box concepts.

## What is Virtual Box?

Virtual Box is a Virtualization software that falls under [Type 2 hypervisor](https://en.wikipedia.org/wiki/Hypervisor?ref=devopscube.com) category. It helps you to create guest operating systems (virtual machines) on a host operating system (desktop/Laptop).

![virtual box type 2 hypervisor](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/type-2-hypervisor-drawio-1-1.png)

If you are starting your Cloud or [DevOps](https://devopscube.com/what-is-devops-what-does-it-really-mean/) journey, Virtual box is a great software to practically learn virtualisation concept. You can create Linux and Windows based virtual machines on your workstation. The number of virtual machines that you can create is based on the underlying CPU and memory resources of your workstation.

## Virtual Box Installation

**Step 1:** Go to [VirtualBox Downloads page](https://www.virtualbox.org/wiki/Downloads?ref=devopscube.com) and download the application based on your Operating System. It is available for MAC, Windows and Linux System.

**Step 2:** Install the Virtual box application from the downloaded binary.

![Virtual Box application UI](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-13-36.png)

## Download ISO Image

To create a virtual machine, you need to have an ISO image.

For this example, we will use the ubuntu server image which is freely available on the official ubuntu website.

> **Note**: You can use any ISO image. Centos, Ubuntu Desktop, Windows etc. You can find all Virtual Machine images and its download links in the [Images Page](https://virtualboxes.org/images/?ref=devopscube.com).

Go to Ubuntu [Server Downloads](https://ubuntu.com/download/server?ref=devopscube.com). Choose the manual server installation and download the latest server image.

![Virtual Box ubuntu ISO download](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-14-51.png)

## Creating Virtual Machines in Virtual Box

Follow the steps given below to create a virtual machine using Virtual Box.

**Step 1:** Click the new button.

![create new virtual machine on Virtual Box.](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-15-35.png)

**Step 2:** Type in a name and choose options as shown below.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-16-39.png)

**Step 3:** Add the memory as per your requirement. Make sure you leave enough room of the host operating system.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-17-33.png)

**Step 4:** Choose the option to create a virtual hard disk as shown below.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-18-35.png)

**Step 5:** Choose VDI option.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-19-36.png)

**Step 6:** Choose "Dynamically allocated" option.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-20-37.png)

**Step 7:** Add a disk storage size and click create.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-21-38.png)

You should see the VM in the powered off state.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-22-34.png)

**Step 8:** Right click on the VM, go to start and then click Normal start. It will open a **pop-up to add the ISO image.**

![Start virtual box VM](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-23-36.png)

**Step 9:** Click the folder option in the popup.

![load ISO image in Virtual box](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-24-30.png)

Use the **plus button** and load the downloaded ISO image from your computer as shown in the below images.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-25-31.png)

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-26-29.png)

**Step 10:** Once the ISO image is loaded, click the start option.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-27-27.png)

**Step 11:** In the next popup, enter the first option that says "Install Ubuntu Server"

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-28-25.png)

You need to proceed with the normal booting process of the servers. Not all the screenshots are added as these options are self explanatory.

> **Note:** Use the keyword up and down arrows to move and space button to the select option

When you get the following option, select the disk we created in the initial steps.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-29-26.png)

In the profile setup, provide name and password that you remember. You will need the user name and password to login to the server. Select "Done" and press enter.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-30-23.png)

You can choose to ignore the server update and proceed with logging in to the server.

## Start, Stop and Delete Virtual Box VMs

Once you have virtual machines created in Virtual box, you can start, stop and delete it using the Virtual box UI as shown below.

![](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-31-17.png)

## Virtual Box Networking Modes

Virtual box has the following networking modes.

1. [NAT](https://devopscube.com/what-is-nat-how-does-nat-work/)
2. Bridged
3. Internal network
4. Host-only adapter
5. NAT network
6. Cloud Network

With each networking modes, you will get a different [IP address](https://devopscube.com/ip-address-tutorial/) that is part of the Networking mode.

For example, in bridged network mode, your virtual machine will get an IP address from the Router you are connected to. Meaning, anyone in the router network can access your VM running inside your workstation.

You can change the networking modes from the settings of the Virtual machine as shown below.

![Virtual Box networking modes](https://storage.ghost.io/c/5f/2f/5f2f4d20-2abf-4534-8d40-7aa233aedd43/content/images/2025/03/image-32-28.png)

## Possible Virtual Box Errors

### Ubuntu Errors

In Ubuntu systems, while trying to create a virtual machine, you might get the following error.

```
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
```

If you get the above error, enter the BIOS settings via reboot.

In that, go to Advanced settings and secure boot. Then disable secure boot.

### MAC Errors

In MAC systems, you might get the following networking error.

```
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

VBoxManage: error: Failed to create the host-only adapter
```

To rectify it, go to MAC system preferences --> security and privacy --> Restart to enable system changes by Virtual box.

## Conclusion

In this **virtual box tutorial**, we learning how to create virtual machines on Oracle Virtual Box software.

If you would like to automate the Virtual machine creation on Vagrant for Development and testing purposes, you should checkout Vagrant. In the [Vagrant tutorial for beginners](https://devopscube.com/vagrant-tutorial-beginners/), you will find step by step instructions to automate VM provisioning and configurations.