Brief: In this guide, we will explore how to install VirtualBox 7.0 on AlmaLinux 9 and AlmaLinux 8 distributions to create virtual guest machines using an ISO image file.
Oracle VM VirtualBox, currently owned and maintained by Oracle, is one of the world’s most popular open source virtualization platforms that allows users to create virtual machines from underlying computing hardware.
VirtualBox It is a type 2 hypervisor, which means that it is installed on top of an existing operating system, such as Windows or Linux, to create an abstraction layer that emulates hardware components such as CPU, RAM, and storage. By doing so, it allows users to create virtual components known as guests or virtual machines.
VirtualBox it supports a wide range of guest systems, including Windows, Linux, OpenBSD, Solaris, and OpenSolaris.
At the time of writing this guide, VirtualBox 7.0.2 is the most recent version, which was released on October 10, 2022, and comes with the following important improvements.
Virtual Box Features
- A new VM setup wizard with the ‘ Unattended installation of the guest operating system ‘ to facilitate a more streamlined workflow.
- Added DirectX 11-based 3D support (and DXVK on non-Windows systems).
- EFI support for secure boot.
- Support for Secure Boot and TPM 1.2/2.0.
- Full disk encryption for guest virtual machines.
- Inclusion of EHCI and XHCI USB controller devices as part of the open source base package.
- Added GUI utility to monitor performance statistics such as RAM and CPU usage, disk I/O, etc.
- Cloud virtual machines can be added to Virtual Machine Manager and controlled like local virtual machines.
For a more comprehensive list of all provided features, please refer to the Virtualbox release notes.
Step 1: Check virtualization on AlmaLinux
As a prerequisite for installing any hypervisor, you must have an Intel or AMD CPU with virtualization enabled. Therefore, first of all, check if virtualization is enabled.
To do so, run the following lscpu command:
$ lscpu | grep -i virtualization
The following result confirms that our system is equipped with the technology Intel Virtualization indicated by the directive VT-x.
Virtualization: VT-x
Virtualization type: full
Once you have confirmed that your system supports virtualization, continue to the next step.
If the output does not show any virtualization support, you need to enable it from the settings BIOS to enable virtualization.
Step 2 – Enable EPEL Repo on AlmaLinux
Some essential dependencies are required for the installation to go smoothly. But first, make sure you install the repository WARM in the following way.
$ sudo dnf install epel-release -y
After the installation is complete, install the dependencies as follows.
$ sudo dnf install dkms kernel-devel kernel-headers gcc perl bzip2 wget curl make -y
kernel -devel is a development package for creating kernel modules that match the kernel. It provides kernel headers and makefiles to build modules against the kernel.
The version kernel development installed will be different from the kernel version on your system.
You can verify this by running the following commands:
$ rpm -q kernel-devel $ uname -r
To resolve the inconsistency between the two versions, upgrade the system.
$ sudo dnf update -y
Then reboot the system
$ sudo reboot
Once again, confirm that the version kernel development matches the linux kernel.
Check kernel development version
Step 3: Install VirtualBox 7.0 on AlmaLinux
To install the latest version of VirtualBoxwe need to add the official VirtualBox repository as follows.
$ sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
You can list all versions of VirtualBox which provides the repository as follows.
$ dnf search virtualbox
VirtualBox version list
From the output, you can see that the repository provides VirtualBox 7.0.
To install VirtualBox 7.0run the following command:
$ sudo dnf install virtualBox-7.0 -y
The command install VirtualBox 7.0 along with other dependencies.
Instalar VirtualBox en AlmaLinux
Step 4: Install the Virtualbox extension pack on AlmaLinux
VirtualBox Extension Pack is a package that extends the basic functionality of VirtualBox and provides additional functionality such as:
- Copy and paste text to and from the host.
- Use of USB devices in your virtual environment (USB 2.0 and USB 3.0).
- Using the webcam on the guest system.
- Disk Image Encryption.
- and much more.
To install VirtualBox Extension Pack, head over to the official Virtualbox download page. Similarly, you can download the extension pack using the wget command as shown.
$ wget https://download.virtualbox.org/virtualbox/7.0.2/Oracle_VM_VirtualBox_Extension_Pack-7.0.2.vbox-extpack
Then build the kernel modules as follows.
$ sudo /sbin/vboxconfig
Next, install the VirtualBox extension pack as follows.
$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.2.vbox-extpack
Review the User License and accept the license terms and conditions by typing 'y'
and pressing ENTER.
Install the VirtualBox extension pack on AlmaLinux
In this point, VirtualBox it’s installed. To start using it, use the Application Manager to find it and click Oracle VM Virtualbox to start Oracle VM Virtualbox Manager as shown.
Oracle VM Virtualbox Administrator
Step 5: Create a Virtual Machine in AlamLinux
In this section, we will demonstrate how to create a virtual machine using an ISO image file. we have a file Linux Mint ISO saved locally on our system AlmaLinux.
To start creating a virtual machine, click ‘ Nuevo ‘ as it’s shown in the following.
Create New Virtual Machine in AlmaLinux
This starts the virtual machine setup wizard. Make sure to fill in all the details, including the name of the virtual machine, a path to the VM, and the ISO image, and click ‘ Following ‘.
Details of the new virtual machine
Drag the sliders to select your preferred memory size and amount of CPU. Then click ‘ Following ‘.
Virtual Machine Hardware Configuration
Next, specify the capacity of the virtual hard disk and click ‘ Following ‘.
Virtual Machine Hard Drive Configuration
You will be provided with a summary of all the settings you have chosen. If everything looks good, click ‘ finalize ‘; otherwise, click ‘ Back ‘ and make the necessary changes.
Virtual Machine Summary
Once you click ‘ finalize ‘, the virtual machine will be displayed in the left sidebar as shown. To start the virtual machine, click the ‘ Start ‘.
start virtual machine
A few seconds later, the virtual machine will open and the GRUB menu for your operating system will be displayed. From there, you can continue with the installation of your operating system.
install virtual machine
Step 6: Configuring the virtual machine
VirtualBox offers a wide range of options to help you make a number of settings that will help you better manage and get the most out of your virtual machine.
To take a look at the provided settings, click the ‘ Setting ‘.
Virtual machine configuration
In the left sidebar, you will see a list of options that you can modify. For example, the option ‘ System ‘ allows you to adjust various system parameters such as memory, number of CPUs, boot order, extended features, and acceleration.
Virtual Machine System Configuration
Click on the tab ‘ Processor ‘ to change the number of processors.
virtual machine processor
The option ‘ Screen ‘ allows you to adjust video memory and other graphics options.
virtual machine screen
In the section ‘ Red ‘, you can add or remove virtual adapters, as well as change the type of adapter to use.
virtual machine network
Paso 7: Instale VirtualBox Guest Additions en AlmaLinux
VirtualBox Guest Additions are additional pieces of software that come included with your copy of VirtualBox. They provide additional features that improve the functionality and performance of your virtual machine.
To install guest additions, go to Devices -> Insert Guest Additions CD Image.
Insert guest additions
Installing Guest Additions in AlmaLinux
In this tutorial, we have demonstrated how to install VirtualBox 7.0 in AlmaLinux 8/9. Additionally, we look at how to create a virtual machine, adjust various settings, and finally how to get the most out of your guest machine by installing VirtualBox guest additions.