Welcome to this video about installing Oracle VM VirtualBox on an Oracle Linux cloud instance,
and using it to create a new guest virtual machine.
Oracle VM VirtualBox allows the simple and fast creation of virtual machines,
also referred to simply as VMs, supporting a wide variety of operating systems.
This video demonstrates installing VirtualBox and its extension pack on
an Oracle Linux cloud instance, as well as the supporting packages for VirtualBox.
It shows creating a new virtual machine using VirtualBox installed on the instance,
and installing the Guest Additions to the new VM.
You can read more detailed information about Oracle VM
VirtualBox at this documentation link. There is also a free hands on lab available
where you can practice the steps shown in this video in a real live environment.
You can access the lab at this link, and at the end of this video there is a link where you can
access many more free technical hands on labs covering a wide range of Oracle Linux topics.
Our Oracle Linux instance is installed as a Server with GUI and here we are looking
at the desktop of this cloud instance. To support the installation of VirtualBox
on Oracle Linux, we first need to install some supporting packages.
If you are installing VirtualBox on a Microsoft Windows instance you do not
need to install the supporting packages. We will do this from command line, so we
click on the Activities menu and select Terminal to open a terminal window.
The required packages are installed using the command sudo dnf install
-y kernel-uek-devel-$(uname -r) gcc make perl. The option uname -r will ensure that the matching
development packages for the currently active uek kernel get installed.
The packages installation takes a few minutes to complete.
If we change the uek kernel of the host system later on, we will need to rerun the VirtulBox
setup to recompile the driver modules. To have them automatically recompiled
without the need to rerun setup, a useful utility called Dynamic Kernel
Module Support (DKMS) is recommended. Installing the dkms package ensures modules
are automatically recompiled if the Linux kernel on the VirtualBox host system is upgraded.
The dkms utility is found in the ol8_developer_EPEL repository,
which can be installed from yum.oracle.com. Our system has the repository configuration,
but it is not enabled. We enable it with the
command sudo dnf config-manager --set-enable ol8_developer_EPEL.
The repository is verified installed with the command sudo dnf repolist.
Here we can see the ol8_developer_EPEL repo listed.
Now we install the dkms package with the command sudo dnf install -y dkms.
If this EPEL developer repository is not configured for the system, you can use the command
sudo dnf install -y oracle-epel-release-el8. Now to install VirtualBox.
We click on Activities menu, and open the browser.
Oracle VM VirtualBox is available and can be downloaded from the virtualbox.org website.
We click on the Downloads link on the left side menu.
As our host system is an Oracle Linux system, in the main window, under VirtualBox 7.0.x platform
packages, we click Linux distributions. As the instance we are using with desktop
GUI is running Oracle Linux 8, under VirtualBox 7.0.4 for Linux, we right-click on the link for
Oracle Linux 8 and select Copy Link. Returning to our Terminal, we use the
command sudo dnf install -y and paste in the link copied to the VirtualBox package.
From the Activities menu, clicking the Show Applications icon,
Oracle VM VirtualBox is now listed. Now we can open the VirtualBox application.
I can close the notifications window showing Can't enumerate USB devices, it's not needed.
Next we install the VirtualBox Extension Pack. Extension packs provide extra functionality to
the VirtualBox base package, such as extended USB device support and cloud integration features.
We return to the browser showing the VirtualBox page, and click again the
Downloads link on the left side menu. We scroll down to the VirtualBox Extension
Pack section, and click the link all supported platforms to download the extension pack.
Here the browser saves the file to the Downloads directory.
To install the extension pack we return to the VirtualBox application.
To get to extension settings we click the three dots icon in the Tools menu
and select Extensions. Click the Install button.
From the opened Downloads folder we select the Extension Pack file and click Open.
Then click Install in the confirmation dialog. In the License dialog, we must scroll the text
to the bottom and then click I Agree. As I am logged into the system as my user,
I need to have elevated privileges to make the install, so in the Authentication Required dialog,
I give my user password and click Authenticate. We see the extension pack is now installed.
With VirtualBox ready we can now create a new Oracle Linux virtual machine.
To get back to the VM creation menu we click the Tools menu and select Welcome.
Here we click New to create a new VM. We can use a guided mode to create the VM, but for
this video we will create using Expert Mode, which gives us more initial options to configure in a
single page multi section dialog for the VM. Under Name and Operating System,
I will give the name ol8-6new1. To choose the version of Oracle
Linux to install, we click the ISO Image dropdown and select other.
In this video I am installing Oracle Linux 8, but you can download the ISO version of Oracle
Linux you want from yum.oracle.com or the Oracle Software Delivery Cloud, edelivery.oracle.com.
We select the pre downloaded ISO file, and click the Open button to select it for use.
I will tick the Skip Unattended Installation box to prevent VirtualBox
from automating the full installation. Oracle Linux has certain memory and CPU
requirements, so we expand the Hardware section by clicking on the arrow beside the title.
We will set the Base Memory to 8 gigabytes using the slider,
or we could also use the input field. We set Processors to 2 with the slider.
Expanding the Hard Disk section allows us to define the size of the hard drive
to be used with the new VM, but we will leave the default of 20GB.
If we wanted to select a different hard disk type to be created, for example VMDK or QCOW type,
we would use the dropdown in the Hard Disk File Type and Variant section.
We click Finish to create the VM configuration, and are returned to the VM parameters screen.
Before starting the VM, we need to enable nested virtualization for our
new VM to allow the pass through of hardware virtualization functions to the guest VM.
In the VM parameters, click on System to open the system settings for the VM.
We select the Processor tab and tick the box for Enable Nested VT-x/AMD-V,
then click the OK button. We can now launch the virtual
machine and install the OS. We click Start to launch the VM
and start the operating system installation. At the Linux launch menu, we press the up arrow
to select Install Oracle Linux 8.6.0 and press the Return key to begin the installation.
Soon we are presented with the Oracle Linux graphical installation utility, and click the
Delete finished notifications button to close the overlaid notification slider window.
We take the default language setting and select Continue.
When we click into the new VM window the first time we are presented with
a window informing that the mouse will be captured.
To stop getting this reminder each time we click into the window, I tick the box Do not show this
message again and click Capture. To get mouse control back outside of
the VM window, we press the Right Ctrl button on your keyboard.
I will skip forward through the installation steps, but if you want to see the steps to
install Oracle Linux, you can watch this video and see the manual installation steps.
We can now click Begin Installation to install the operating system to the VM.
The install will take a few minutes so I will fast forward through this.
When the installation is complete,
we click Reboot System to restart the VM and launch the new operating system.
After the VM has rebooted, on the initial setup screen, we click License Information.
We tick the box for I accept the license agreement and then click done.
We can now click finish configuration.
After a short while, the operating system presents us with the
desktop GUI, and the welcome screen. We click next on the Welcome screen.
We click the slider to turn off the Location Services and then next.
Then click Skip to continue without connecting online accounts.
I input a name for a new user into the full name field, the same name is used
into the Username field, then click next. We set a password for our user, and click next.
Finally we click Start Using Oracle Linux Server to finish the initial setup.
And we can close the getting started window. That's our new VM built and running.
To support additional useful VirtualBox features,
we can install the optional VirtualBox Guest Additions to the VM guest.
To prepare VM for Guest Additions, we must install supporting packages.
These are the same packages as we used to prepare our host system before
installing the VirtualBox application. As this is a new Oracle Linux install,
it is always recommended to update the system to ensure you are using the latest
software and packages. But we will go straight to
installing the Guest Additions software. On our VM desktop, we click on Activities menu,
and open the terminal on our VM. We install the packages with the command
sudo dnf install -y kernel-uek-devel-$(uname -r) gcc make perl, and give our user password to run
the command at elevated privileges. When the software install completes we
can then install the recommended Dynamic Kernel Module Support, or DKMS package.
This is as we did for the install of VirtualBox on our host system.
As the new VM has only the default repositories installed.
To support install of dkms we need to install configuration for the ol8_developer_EPEL repo.
We us the command sudo dnf install -y oracle-epel-release-el8.
We can verify the repository is installed and enabled with the command sudo dnf repolist all.
Here we see the two EPEL repos enabled. Now we install the dkms package with
the command sudo dnf install -y dkms.