Hello, and welcome to this presentation on setting up an Oracle Cloud Infrasturcture
Instance to run Oracle VM VirtualBox.
In this video you will learn, to examine the state of an Oracle Linux Instance.
To identify the additions needed before installing Oracle VM VirtualBox.
To illustrate the steps used to prepare the instance for the Oracle VM VirtualBox installation.
And to demonstrate the steps involved when installing Oracle VM VirtualBox and its expansion
pack on the instance.
In preparation for this video I have already created an Oracle Linux Instance called dg-vbox01
in my Oracle Cloud Infrastructure.
Its running the Oracle Linux 7.8 image provisioned by a standard VM shape.
The Oracle Linux 7.8 image installs in a minimal configuration on the instance so there is
some work to do before installing Oracle VM VirtualBox.
Using the command line interface for the instance we need to carry out some commands to prepare
the instance.
I have already set up a user account called oracle and added it to the Wheel group in
order to run the sudo command and execute privileged operations.
Our first action is setting the http proxy's for the oracle account.
Here we see a series of commands to illustrate setting the proxy.
We do this to access Oracle's yum server to complete later tasks.
Running the env command and piping it to grep we run a search for the word http.
And here the search did not return any results.
So, to route HTTP requests to Oracle's yum server, we edit the .bash_profile file and
set http_proxy variables that point to the proxy server.
I am not showing my proxy settings used for security reasons, but the settings will be
specific to your own network requirements.
We save the new settings to the file and then run the source command to set the variables
for this login session.
Now, when we rerun the env | grep http command, we see our proxy's are now set.
We are going to launch Oracle VM VirtualBox's graphical interface, so we need a graphical
environment to do this.
However, the virtual machine instance image I have used does not provide that kind of
environment.
So to illustrate installing the environment we need, we run the command sudo yum group
install "Server with GUI".
After the completion of the install, we run the command yum grouplist | grep -i installed
to list the installed software package groups.
Listed in the Installed Environment Groups section is the Server with GUI group.
And finally, we need to install a program that remotely connects us to the graphic desktop
of our instance.
For this, we are installing the TigerVNC server software package.
Installing TigerVNC is quite easy, but it does require some post install configuration
also.
Running the command sudo yum install tigervnc-server installs the application.
As the oracle user I set a password for security by running the vncpasswd command.
TigerVNC will now prompt us for the VNC password before connecting to the systems desktop.
The program stores a password file in the $HOME/.vnc/ directory.
When asked if we want to use a view-only password, we select n for no.
Remember, there is more information about vnc passwords in the vncpasswd man page.
After setting a password, we need to configure VNC services for the oracle user.
The TigerVNC server doesn’t start automatically.
Each user connecting to the VNC server starts its own process, and the systemd daemon manages
all the requests.
We begin by copying the sample VNC service file in the /etc/systemd/system directory
to a different name signified by a colon followed by a number.
In our example we copy it with the command cp /lib/systemd/system/vncserver@.service
/etc/systemd/system/vncserver@\:2.service.
We then edit the new file and update with details about our instance user.
Starting in the section [Service], we replace the generic information for the Working Directory,
User, and Group with information specific to, in my case, the oracle user.
Just below that is a grouping of directives on starting and stopping the process.
To size the window to certain a dimension, we opted to append -geometry 1280x1024 to
the end of the ExecStart directive.
And we insert the line, PIDFile=/home/oracle/.vnc/%H%i.pid below this and save our changes.
We have more things to do before moving on to the Oracle VM VirtualBox installation demonstration.
The first is to run three systemctl commands.
The command sudo systemctl daemon-reload reloads the service unit configuration file.
The command sudo systemctl enable vncserver@\:2.service enables the VNC server, and the command sudo
systemctl start vncserver@\:2.service starts the server.
We can verify the status by issuing the command sudo systemctl status vncserver@\:2.service
from the command line.
Then we configure firewalld to add the vnc-server service for access to oracle's VNC desktop.
We run the command sudo firewall-cmd --permanent --add-service=vnc-server to add the service
permanently.
We'll confirm this with the command sudo firewall-cmd --list-all.
Ok, now we are good to go.
So now we are ready to install Oracle VM VirtualBox.
After connecting with TigerVNC to our instance desktop, I have opened a terminal window and
logged in as the oracle user.
Before we get to the actual Oracle VM VirtualBox install, we need to discuss how to run other
operating systems in virtual machines alongside your main operating system.
Oracle VM VirtualBox needs to integrate these very tightly with your system.
To do this, we need to install a driver module called vboxdrv into the system kernel.
The kernel is the part of the operating system which controls your processor and physical
hardware.
Without this kernel module, you can still use the VirtualBox Manager to configure virtual
machines, but they will not start.
Additionally, network drivers called vboxnetflt and vboxnetadp are also installed.
They enable virtual machines to make better use of your computer's network capabilities
and are needed for any virtual machine networking beyond the basic NAT mode.
The Oracle VM VirtualBox install process creates these modules on the system where they will
be used.
This means that you may need to install some software packages from the distribution which
are needed for the build process.
This video demonstrates this dependency.
First, we will install the GNU compiler or GCC, GNU Make, and perl.
We use the command sudo yum install gcc make perl.
We enter Y to agree to the installation.
This takes a few minutes, let's skip ahead...
And here we can see the three packages are installed.
With these installed we can now move on to installing VirtualBox on our instance.
Here we are looking at the desktop of our virtual machine instance.
We start by downloading the VirtualBox install and extension pack packages.
I have already opened a browser and navigated to the virtualbox.org site downloads page.
To get the Linux platform packages we click on Linux distributions.
As our virtual machine instance is running the Oracle Linux 7.8 image provisioned by
a standard VM shape, we click on the Oracle Linux 7/Red Hat Enterprise Linux 7/CentOS
7 link to download the install rpm.
In the download pop up window, we save the file to our instance.
To download the Extension Pack file, from the menu, we click Downloads to return to
the Downloads page.
And under the VirtualBox Oracle VM VirtualBox extension Pack section, we click on the All
supported platforms link.
And again, the pop up window allows us to save the Extension Pack file to our instance.
With the downloads complete, we now open our terminal window which is already looking at
the Downloads directory.
Using the command ls shows us the two download files ready for us to install.
To first install the VirtualBox software, we run the command sudo yum install and I
copy and paste the name of the rpm file to the command line.
We enter Y to agree to the installation.
With the VirtualBox software installed, we now install the Extension pack.
We use the vboxmanage command to install the extension pack, so we run the command sudo
vboxmanage extpack install and the name of the extension pack file.
Clicking Y to accept the license terms, the pack is installed.
Now, let's launch the Oracle VM VirtualBox application.
Under the desktop Applications tab, select System Tools, and then click the Oracle VM
VirtualBox icon to start the application.
To show the extension pack is installed, navigate to the File menu, and then Preferences.
In the Preferences window, we select Extensions, and see the extension pack is installed, active,
and its version displayed.
We can click Ok to close this window.
And thats Oracle VM VirtualBox and its extension pack installed on this VM instance.
In this video you learned, to examine the state of an Oracle Linux Instance to identify
the additions needed before installing Oracle VM VirtualBox.
To illustrate the steps used to prepare the instance for the Oracle VM VirtualBox installation.
And to demonstrate the steps involved when installing Oracle VM VirtualBox and its expansion
pack on the instance.
Oracle provides an extensive number of resources which you can use to find out more about this
subject and others.
Visit the links shown to view documentation on Oracle VM VirtualBox and an extensive collection
of training content covering many aspects and skills for Oracle Linux and Linux on Oracle
Cloud Infrastructure.
Thats the end of the video, thanks for watching.