How to Install VirtualBox 7.0 on Ubuntu 22.10

This article will explore setting up version 7.0 of Oracle VM VirtualBox and its Extension Pack. This thorough guide will provide step-by-step instructions for creating a new virtual machine, specifically on the Ubuntu 22.10 (Kinetic Kudu) distribution.

How to Install VirtualBox 7.0 on Ubuntu 22.10

How to Set Up Oracle VM VirtualBox 7.0 (7.0.2) on Ubuntu 22.10 Distribution

You can create virtual machines on your desktop or laptop computers with Oracle VM VirtualBox. This influential software lets you efficiently install and run different operating systems, including Windows, Linux, and macOS. However, your processor must have virtualization capability to create virtual computers using this software.

To inspect if your CPU supports virtualization, visit your hardware manufacturer’s website or use third-party software tools. These resources will provide the necessary information to determine the virtualization capabilities of your processor.

Oracle VM is a free and popular virtualization program defined in the Hypervisor Type 2 virtualization group.

Once you have established the VirtualBox program on your Linux PC, you can make a new virtual device. You can initiate the installation process by integrating the ISO files of the desired operating systems into this virtual machine. One notable advantage of VirtualBox is its open-source nature, meaning it is a free choice. This means you can appreciate the benefits of virtualization without incurring additional costs.

After running the virtualization software on the Linux system, you must download and install the Extension Pack required for the program. This software lets you use your host device’s hardware on guest machines like USB, Webcam, or network card.

How to Download and Install VirtualBox

You can download Oracle virtualization software from different platforms and its official website. Visit the VirtualBox.org website as the first step. From there, you can download the deb installation package corresponding to the Linux distribution you installed on your PC.

Step 1

To download Oracle VM for Linux systems, visit this address and click Download VirtualBox 7.0 image.

VBox Download for Linux

Step 2

Click on Linux distributions from the Downloads section.

Linux Distributions

Step 3

Click on the Ubuntu 22.04 option on the Download VirtualBox for Linux Hosts webpage and download the deb package to your system.

Ubuntu 22.04

Step 4

For you to install the Oracle virtual machine software on Ubuntu 22.10 correctly, first add the 22.04 (Jammy Jellyfish) repo address to the software repo list, and then update the software list by executing the “sudo apt update” command in the terminal.

echo "deb http://archive.ubuntu.com/ubuntu/ jammy main" | sudo tee -a /etc/apt/sources.list
sudo apt update

Editing and Updating the Repository List

Step 5

For VirtualBox to run smoothly on Linux systems, you must install the necessary Linux kernel packages. Otherwise, the Oracle virtualization software will not open properly, and its services will not be started.

sudo apt install linux-headers-$(uname -r) build-essential dkms -y

NOTE: Suppose you encounter the error message “The vboxdrv kernel module is not loaded” even after installing the Linux kernel packages. In that case, you can resolve this issue by installing the required Linux kernel and its dependent packages mentioned in the warning notice. Follow the commands below to fix this problem, specifically on the 22.04 version.

wget http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.15.0-27.28_amd64.deb
sudo dpkg -i linux-libc-dev_5.15.0-27.28_amd64.deb
sudo apt install linux-headers-$(uname -r) build-essential dkms -y
sudo /sbin/vboxconfig

Installing Linux Kernel Packages

Step 6

The VirtualBox program has the exe extension on Windows and the deb file extension on Linux systems. On Linux systems, packages with deb extension are usually installed with the dpkg command.

Open the terminal to establish the VirtualBox.deb package you downloaded on your PC. Once the terminal is available, execute the “cd ~/Downloads” command to open the Downloads zone.

After reaching the Downloads location, you can proceed with the installation process by executing the command “sudo dpkg -i FileName.deb”. Make sure to replace “FileName.deb” with the actual name of the VirtualBox.deb package file you downloaded.

cd ~/Downloads
sudo dpkg -i virtualbox-7.0_7.0.2-154219_Ubuntu_jammy_amd64.deb

Installing the VirtualBox.deb Package

Step 7

When installing the Oracle deb package, execute the “sudo apt install -f -y” command to force the installation of the relevant packages and automatically approve the additional disk space usage in the terminal window, which states that some dependent packages must also be installed on your system.

sudo apt install -f -y

You can use the “sudo systemctl status vboxdrv.service” command in the terminal to check whether the VirtualBox services run smoothly after installation.

sudo systemctl status vboxdrv.service

Force Installation of Dependent Packages

Step 8

Once you have successfully installed the Oracle virtual machine software, you can effortlessly launch it by employing the “virtualbox” command in your terminal or by conveniently locating and opening the application from the start menu.

virtualbox

Running VirtualBox

Step 9

You can open the Help / About window from the tool menu and check the new version of VirtualBox software.

Checking the Version of Oracle Software

How to Install Extension Pack

After installing the VirtualBox software on your Ubuntu system, you first need to install the Extension Pack so virtual machines can work more efficiently.

After installing VBox on your system, you need to install Extension Pack. Establishing an Extension Pack is primarily to use virtual machines more effectively.

Upon installing this package, you can seamlessly transfer files between the virtual machine and your physical computer, facilitating efficient data exchange. Additionally, you can enhance your experience by utilizing the virtual machine in full-screen mode, optimizing your workspace for improved productivity and visual immersion.

Step 1

Visit the website where you downloaded the VirtualBox program, and then click All supported platforms as in the image below to download the Extension Pack.

Download and Install Extension Pack

Step 2

Start the installation by double-clicking on the vbox-extpack file you downloaded to the Downloads location.

Installing the VBox-Extpack Package

Step 3

As soon as you double-click on the file, VirtualBox – Question window will open as below. This window informs you that you must install Extension Pack to use USB devices, webcam, RDP, PXE ROM, disk encryption, and NVMe features on guest machines. To use the specified segments, click the Install button to start the installation.

Reading Information About Oracle VM VirtualBox Extension Pack

Step 4

Please scroll down the page to accept the license agreement; the I Agree button will be active. While installing the package, type your user password in the window that will appear and click the Authenticate button.

Accepting the License Agreement of the VBox Package

Step 5

Open the File / Tools / Extension Pack Manager application from the tool menu of the Oracle VM.

Opening Extension Pack Manager

Step 6

After opening the application, you can check that the Extension package, which contains the virtual machine drivers you have installed on your Ubuntu PC, is established.

Checking the Version of the Package

How to Create a New Virtual Machine on Ubuntu OS

After installing Oracle VM VirtualBox without problems, you must create a new virtual machine and examine it for errors.

This section provides an all-out guide on setting up a Windows 10 virtual PC on a Linux distribution. By diligently following our step-by-step guide, you can effortlessly proceed with the installation, guaranteeing a seamless experience.

NOTE: If you get the “Fix Can’t enumerate USB devices” error when you run the Oracle VM software, you need to manually add the existing user account on your system to the vboxusers group. To accomplish this, begin by using the “sudo groups $USER” command to verify the groups to which the user belongs. Subsequently, execute “sudo adduser $USER vboxusers” to become a member of the vboxusers group. After this process, restart your Linux computer and check if the Oracle software again gives an error about USB devices.

Step 1

Start the virtual machine wizard by clicking the New button from the available icons in the VirtualBox interface.

Creating a New Virtual Machine in Ubuntu

Step 2

In the Virtual Machine Name and Operating System window, you can set up the VM you want to make by typing its name, installation location, type, and version. Ensure you provide accurate details for each parameter to proceed smoothly with the virtual machine setup. Then, expand the pop-up window from the ISO Image section and click Other; select and open the Windows 10 image file in the window that opens.

Naming the Operating System and Add the ISO File

Step 3

In the new version of Oracle software, you can use the Unattended Installation feature to configure some system settings, such as the product key, more quickly. However, you can skip this feature for a standard operating system installation.

Skipping Unattended Installation

Step 4

Within the Hardware window, you can allocate the desired amount of RAM for the virtual machine in the Base Memory section. Additionally, you can specify the number of virtual cores in the Processor area, aligning it with the capacity of your host PC. Make sure to accurately determine these settings to optimize the performance of your virtual machine.

Configuring Base Memory Size and Processor Cores

Step 5

The virtual disk size will be automatically adjusted according to the operating system version in the hard disk configuration window. Configure a virtual disk size according to the size of your disk and the operations you will perform on the virtual computer, as older operating systems will take up less disk space after installation.

Note: Before proceeding, it is crucial to determine the virtual disk size for your guest machine on the physical HDD/SSD of your host machine. Suppose you select the Pre-Allocate Full Size option in the disk configuration. In that case, the virtual disk may take some time to create, but this may increase performance on older mechanical disks and reduce host disk space. If you continue without checking this option, the Dynamically Allocated disk structure will be used as stated in the old versions of VirtualBox. It means the disk space allocated from your physical disk is as much as the disk space required you will perform on this virtual machine.

Creating a Virtual Hard Disk

Step 6

Check the hardware settings of the guest machine you created on your Ubuntu PC and close the wizard.

Checking Virtual Machine Hardware Information

Step 7

You need to configure a few features of the virtual operating system you create, such as the boot sequence or virtualization feature. After making the virtual disk, click the Settings button, as in the image below.

Opening the Guest Machine's Settings

Step 8

In General / Advanced, configure Shared Clipboard and Drag and Drop settings as Bidirectional to enable file sharing and drag and drop between your host and VM.

Enabling Shared Clipboard and Drag'n'Drop Features

Step 9

Remove Floppy from the Boot Order settings in System / Motherboard and configure the Hard Disk device as the primary device.

In the System / Processor position, you can adjust the number of processors depending on your host computer’s hardware features and performance. For example, if you have an Intel i7 10/11/12th processor, you can set a minimum of 4 or 8 CPUs here.

Changing the Boot Device Order

Step 10

In Display / Screen mode, activate the Enable 3D Acceleration option for a more effective and quality image and configure the Video Memory size to 256 MB.

Enabling 3D Graphics Acceleration

Step 11

To increase the disk performance of the guest machine, after selecting SATA Controller from the Storage location, enable the Host I/O Cache feature from the Attributes section.

Enabling Host I/O Cache for SATA

Step 12

Likewise, select the Solid-State Drive option after selecting the Windows 10.vdi disk file.

NOTE: If you want to change the ISO image that you added to your VM in the first step of the wizard after making the necessary settings, click on Storage / Empty / Optical Drive, and you can choose the image after clicking Choose a disk file from the options that appear.

Configuring VDI Disk File as SSD

Step 13

If you want to connect a USB 3.0-supported External HDD to the virtual machine, enable the USB Controller and tick the USB 3.0 (xHCI) Controller.

Selecting the USB 3.0 Controller

Step 14

Click the Start icon from the Oracle interface to run the Windows 10 guest virtual computer and proceed to the system installation.

Running the Windows 10 Virtual PC

Step 15

After running the Windows 10 guest machine and booting it with the ISO file, you can install your system using the Install Windows wizard.

Windows 10 Setup Wizard

How to Delete the Virtual Machine

Suppose you must remove or delete your Windows guest machine from your system. In that case, you can accomplish this effortlessly by following these actions: First, open VirtualBox. Next, find your VM in the left section and proceed to right-click on it. Finally, select the “Uninstall” option from the resulting menu.

In the Question window that opens, click the Delete All Files button to clear all files related to your virtual machine from your disk.

Deleting the New Virtual PC Created

How to Uninstall VirtualBox from Ubuntu

Once VirtualBox is installed, several actions take place. Firstly, a shortcut is generated in the Show Applications menu. Secondly, a folder named VMs is established in the Home directory, serving as the storage location for virtual machines. A separate folder is also created at /usr/lib/ to house essential files. Lastly, a new user group called vboxusers is formed within the user groups.

Deleting all suitable locations or files associated with it is necessary to ensure the complete removal of VirtualBox from your system. The most straightforward approach to accomplish this task is by utilizing the terminal. Following the steps outlined in the terminal, you can effectively delete all the required locations or files, leaving no traces of VirtualBox on your system.

Step 1

To remove the dependent packages and installation files of the Oracle software, initiate the following command in the terminal.

sudo apt remove --purge *virtualbox*

Uninstalling VirtualBox

Step 2

To affirm the removal of packages from your system, navigate to the Package section and confidently press ‘Y’, then press the ‘Enter’ key.

Confirming Packages to be Removed

Step 3

Please execute the provided commands in the terminal to remove the Oracle virtual machines and the /usr/lib/virtualbox folder from the Home location. These commands will delete the installed virtual machines and their associated configuration files.

sudo rm -rf ~/"VirtualBox VMs"
sudo rm -rf ~/.config/VirtualBox/
sudo rm -rf /usr/lib/"virtualbox"

Deleting Unnecessary Directories

Step 4

In the final step, removing the VirtualBox user group is essential. Begin by checking if the vboxusers group has already been removed using the compgen command. Once confirmed, proceed to delete the group using the groupdel command.

compgen -g | grep -i "vbox"
sudo groupdel vboxusers

Deleting the VBoxusers Group

Video

Installing Old Versions

If you use more old versions of Ubuntu, installing and utilizing Oracle software is possible. However, it is advisable to update your Linux PC for optimal performance and security regularly. Nevertheless, you prefer to use the older version. In that case, you can build this virtualization software on your system.

Ubuntu
Oracle VM
YouTube Video
Slide
17.10
5.x
18.04
5.x
18.10
5.x
20.10
6.x
21.10
6.x
22.04
6.x
22.10
7.0.x

Related Articles


How to Install VirtualBox on Windows 10
♦ How to Create a Virtual Machine on VirtualBox
♦ How to Install Windows 10 with VirtualBox
How to Update VirtualBox on Windows
♦ How to Install Windows 7 with VirtualBox

Add a Comment

Your email address will not be published. Required fields are marked *