Hello, and welcome to today's video presentation on exporting a Linux VM guest using VirtualBox
6.1 on Oracle Linux 8.
This video will focus on exporting an Oracle Linux 8 guest VM into the OVA format employing
both the graphical interface and the command-line.
So let us get started.
This demo uses a pre-installed Oracle Linux 8 system with VirtualBox 6.1 and a pre-created
Oracle Linux 8 VM named ol8-test-vbox.
The same steps are applicable when using VirtualBox installed on a compute instance of Oracle
Cloud Infrastructure.
However, expect differences in the desktop environment navigation steps if running Oracle
Linux 7 on the compute instance of Oracle Cloud Infrastructure, versus Oracle Linux
8.
Before exporting the virtual machine for use in another hypervisor, ensure to remove VirtualBox
Guest Additions and set the mouse pointer to USB Tablet for better compatibility.
The VirtualBox Guest Additions contain specific drivers and features not used by other hypervisors
such as KVM.
Therefore it is best practice to remove the Guest Additions before performing an export.
This demo uses the graphical interface to start the VM and remove the Guest Additions.
The same steps are accomplished on a headless system using the command-line to start the
VM and then connecting to the VM through SSH.
First, open the Virtual Box graphical interface by clicking Activities in the upper left corner
of the screen.
Next, use the search text field to find and open the Oracle VM VirtualBox application
by starting to type its name.
Click the Oracle VM VirtualBox icon.
Once the Oracle VM VirtualBox Manager opens, start the ol8-test-vbox VM if it is not currently
running.
The purpose of starting the VM is to check if the VM has the VirtualBox Guest Additions
installed.
From within the started VM, open a terminal.
Check if the Guest Additions kernel modules are loaded by typing lsmod | grep vbox.
If you see the vboxvideo module, then the Guest Additions are installed and loaded.
Remove the Guest Additions by running sudo /opt/VBoxGuestAdditions-6.1.10/uninstall.sh
Next, shut down the VM by typing sudo shutdown -h now.
With the VM stopped, select the ol8-test-vbox VM from the left menu.
Enter the VM settings by clicking the orangish-yellow gear icon in the Oracle VM VirtualBox Manager
window.
Then navigate on the left and click System.
Under the Motherboard tab and Pointing Device list-of-values, ensure to set the value to
USB Tablet.
If running VirtualBox on a headless system, make the same Pointing Device changes using
the command on the screen.
[ silence while typing vboxmanage modifyvm ol8-test-cli --mouse usbtablet ]
With those changes made, that completes the steps to prep the VM for export.
Since the Oracle VM VirtualBox Manager is already open, first export the VM using the
graphical interface.
Click the File menu item and then Export Appliance...
Select the ol8-test-vbox VM in the list and then click the Next button.
Use the default values presented and then click the Next button.
A summary of the Virtual system settings will be displayed.
Click the Export button, and the export will begin.
As this process can take a while, we will fast forward to the end.
The OVA file is written by default to the user's Documents directory under /home/oracle
in this environment based on selections made.
To see the file, type ls /home/oracle/Docments/*.ova
That completes the export using the graphical interface.
Next, perform the export of the same VM using the command line.
There are no preparatory steps needed before running the command line export on this VM
as all the necessary actions previously completed when performing the export using the graphical
interface.
If those preparatory steps are not complete, then perform them now on the VM to export.
Open a terminal on the host system.
In the terminal, type vboxmanage list vms to get a listing of all the VMs registered
within VirtualBox.
Next export the VM by typing vboxmanage export ol8-test-vbox -o ol8-test-vbox-cli.ova
In this command, the ol8-test-vbox-cli.ova is the name chosen for the export file.
The display will start showing percentages indicating the progress of the export.
As done before, we will fast forward to the end.
The export finished successfully.
That completes this demo showing two methods to export a VirtualBox VM to OVA format, leveraging
both the graphical interface and the command-line.
More details are available in the VirtualBox documentation.
Thank you for watching this video and enjoy using VirtualBox on Oracle Linux 8.
Please check our additional information on Oracle Linux 8 in the Oracle Linux 8 Documentation
or Oracle Linux Learning Library.