Mike Slinn

VirtualBox

Published 2024-06-11. Last modified 2024-07-06.
Time to read: 3 minutes.

This page is part of the posts collection, categorized under Ubuntu.

This article describes how I set up Ubuntu Desktop 24.04 in a VirtualBox VM.

Mini-Series

This article can be read standalone; however, is part of a mini-series that discusses how to increase the storage capacity and performance of the Ableton Push 3 Standalone (P3S). If you own a P3S, or are thinking of purchasing one, you might want to first read my review.

The articles in this mini-series are:

  1. Ableton Push 3 NVMe Replacement
  2. Thermal Control
  3. VirtualBox
  4. Clonezilla
  5. Supersizing a Partition and Its File System

VirtualBox

VirtualBox allows you to run another operating system within your computer’s operating system. VirtualBox is available for Windows, Macintosh, Linux and other OSes. It can virtualize Windows, Linux, macOS, Solaris, and the BSD UNIX work-alikes.

I often use an Ubuntu Desktop instance in a VirtualBox VM. It is my default Ubuntu instance for general-purpose work.

Terminology

Host
This is the OS of the physical computer on which Oracle VM VirtualBox was installed.
Guest
This is the OS of the physical computer on which Oracle VM VirtualBox was installed.
Virtual machine (VM)
This is the special environment that VirtualBox creates for your guest OS while it is running. In other words, you run your guest OS in a VM.

Installation

I installed VirtualBox and the VirtualBox Extension Pack according to these in­struc­tions.

I then installed Ubuntu Desktop 24.04 as a guest in a new VirtualBox VM. The steps are:

  1. Download the Ubuntu Desktop 24.04 ISO file.
  2. Open VirtualBox and click on the New button to create a new virtual machine.
  3. Name your virtual machine and select Linux as the type and Ubuntu (64-bit) as the version.
  4. Allocate at least 2 GB of RAM to the virtual machine; 4 GB is better.
  5. Choose Create a virtual hard disk now and click Create.
  6. Select VDI (VirtualBox Disk Image) as the hard disk file type.
7 . Choose " Dynamically allocated " for the storage type . 8 . Allocate at least 20 GB of storage space for the virtual machine . 9 . Click on the " Start " button to launch the virtual machine . 10 . In the " Select start - up disk " window , click on the folder icon and browse for the Ubuntu 24.04 ISO file you downloaded . 11 . Click " Start " to begin the installation process . 12 . Follow the on - screen instructions to complete the installation .

VirtualBox Guest Additions

A third item needs to be installed in the guest OS, the VirtualBox Guest Additions. It is included in the VirtualBox download and provides:

  • Seamless mouse support
  • Shared folders
  • Better video support
  • Seamless windows
  • Generic host/guest communication channels
  • Time synchronization
  • Shared clipboard
  • Automated logins

For Windows, the VirtualBox Guest Additions are installed at %ProgramFiles%\Oracle\VirtualBox\VBoxGuestAdditions.iso. For Mac OS X hosts, this file is provided in the VirtualBox application bundle.

Installation

Before installing the VirtualBox Guest Additions in a guest Linux instance, you should install gcc, make and perl. Launch the virtual machine containing the guest Ubuntu image and enter the following at a shell prompt:

Shell
$ sudo apt install build-essential gcc make perl dkms

Now reboot the guest Ubuntu instance.

Each time a VirtualBox Ubuntu instance boots, the VirtualBox Guest Additions CD-ROM image automounts at /media/$USER/VBox_GAs_7.0.18/.

Shell
$ ls /media/$USER/VBox_GAs_7.0.18/
AUTORUN.INF  runasroot.sh                       VBoxSolarisAdditions.pkg
autorun.sh   TRANS.TBL                          VBoxWindowsAdditions-amd64.exe
cert         VBoxDarwinAdditions.pkg            VBoxWindowsAdditions.exe
NT3x         VBoxDarwinAdditionsUninstall.tool  VBoxWindowsAdditions-x86.exe
OS2          VBoxLinuxAdditions.run             windows11-bypass.reg 

To install the VirtualBox Guest Additions in the guest Ubuntu instance, run VBoxLinuxAdditions.run, and then reboot, as follows:

Shell
$ sudo /media/$USER/VBox_GAs_7.0.18/VBoxLinuxAdditions.run
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.18 Guest Additions for Linux  100%
VirtualBox Guest Additions installer
Removing installed version 7.0.18 of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-6.8.0-35-generic
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup 
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 6.8.0-35-generic.
update-initramfs: Generating /boot/initrd.img-6.8.0-35-generic 
$ sudo reboot


* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.