Content
Introductory
Updating our computer's operating system, such as a Moving from Debian 10 to Debian 11, it's always a good time to update the software running on it. One such key piece of software is VirtualBox, which has since been published 7.2 The main version has many innovations, including a cleaner, more modern graphical interface.
In this article, we will walk you through how to upgrade your existing VirtualBox installation to the latest version after switching distributions. The process is a three-step maintenance cycle: first, you need to update the main program on the host system, then you need to update the associated Extension Pack, and finally you need to synchronize the Guest Additions on the guest systems.
Prerequisites
This article is intended to help you restore and upgrade an existing VirtualBox system that is malfunctioning or incomplete after a distribution update. As such, it assumes that VirtualBox is already installed on your machine, such as one of the following:
- Install VirtualBox 5.2 on Debian 9 (stretch) host operating system
- Install VirtualBox 6.0.x on Debian 10 (Buster) host operating system
- Install VirtualBox 6.1.x on Debian 10 (Buster) host operating system
It is important to note that although this description covers a specific case (patching VirtualBox 7.0 -> 7.2 after upgrading from Debian 10 -> 11), the principles and troubleshooting logic presented here are generally valid. For other distributions or different version numbers, the fine details of the commands may vary, but the logical framework to follow - synchronizing the main program, Extension Pack and Guest Additions - remains the same.
Baseline assessment: why update?
Symptoms: signs of version mismatch
After a distribution update, everything may seem fine at first: VirtualBox starts, the list of our virtual machines appears, and the machines may even start. However, there may be problems hidden deep down that only become apparent when we want to use a specific feature. Such symptoms can include poor graphics performance, freezing due to the lack of 3D acceleration, or USB 2.0 / 3.0 unavailability of devices.
The most telling sign is if the VirtualBox graphical interface displays the File -> Tools -> Expansion Pack Manager When you click on the menu item, you will be greeted by a completely empty list.
For comparison, on another properly configured system, we should see the installed, active extension here:
Tip: If the Extension Pack is missing or inactive, the basic virtualization features of VirtualBox may still work, but extra features such as USB 2.0/3.0 support, use of the host webcam, full VM encryption, or remote desktop access (VRDP) will not be available.
Diagnosis: verification of version difference
The cause of the symptoms is almost always a version mismatch between the main program and the extensions. To verify this from the command line, let's do a quick check. First, let's query the version of VirtualBox currently installed:
VBoxManage --version
The output shows the exact version and build number, which in our case is from the 7.0 series.
Next, let's see what the latest version is available on the Oracle server. We can query this with a simple command: LATEST.TXT from file:
friss=$(wget -qO - http://download.virtualbox.org/virtualbox/LATEST.TXT)
echo "A VirtualBox legfrissebb verziója: $friss"
So the diagnosis is clear: our system is running an older VirtualBox, 7.0.x, while version 7.2.4 is already available from the official repository. When updating the distribution, apt The package manager only updated to a minor version of the previous version, but not to the latest major version. We will fix this in the next step.
Updating the VirtualBox main program
Once we have verified that our system is running an older major version, the solution is to update the package. Since we have already configured the official VirtualBox repository for Debian 11 (Bullseye) during the distribution update, the apt package manager already sees the latest available version.
A simple install We can instruct the system to update with the command. APT It handles the situation intelligently: it detects that an older version is already installed, so it offers to uninstall it and install the new version.
apt-get install virtualbox-7.2
The command output clearly shows that the virtualbox-7.0 package is the one to be "removed", virtualbox-7.2 is listed among the "newly installed" packages. Press Yes (I) to continue.
During the installation process, you may receive a warning window indicating that some VirtualBox features (VBoxSVC daemon) may still be running in the background. This is normal, the installer will politely ask you to close any running virtual machines for a smooth upgrade. Press OK to continue.
After the process is complete, our system will be running the latest VirtualBox 7.2 main program. The command line output will confirm the removal of the old version and the installation of the new one.
This completes the first and most important step in the update chain. Now that the main program is up to date, the next step is to synchronize the Extension Pack with it.
Installing the Extension Pack
Now that our main VirtualBox program is up to date, we need to make sure that the corresponding Extension Pack is up to date. The version of this must exactly match the version of the main program in order to function properly.
The changed file naming scheme
Compared to my previous descriptions, the file naming scheme has changed slightly since VirtualBox 7.1.0: the "_VM_" member.
Old scheme: Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack
http://download.virtualbox.org/virtualbox/7.0.0/
New scheme: Oracle_VirtualBox_Extension_Pack-7.2.4.vbox-extpack
http://download.virtualbox.org/virtualbox/7.2.4/
Because of this, our simplified download command used earlier would fail with a "404 Not Found" error because it would not find the expected filename on the server.
Dynamic filename extraction
You can also download the required file via the browser, but if you are looking for a reusable, automated solution, then instead of manually searching for the correct name, create a new command with filtering logic that exactly matches the new naming scheme, thereby automatically extracting the exact file name for us. This way, we can also use it for the next Virtualbox minor or patch updates. The curl We download the contents of the download page using the command, then grep command to "cut" the file name that is relevant to us.
friss=$(wget -qO - http://download.virtualbox.org/virtualbox/LATEST.TXT)
extpack_file=$(curl -s "http://download.virtualbox.org/virtualbox/${friss}/" | grep -oP '(?<=href=")[^"]+' | grep "${friss}\.vbox-extpack")
echo "A letöltendő fájl pontos neve: ${extpack_file}"
You can even save the command lines in a script file and make it executable by giving it run permissions (chmod +x), so that you only need to call it when you update the next Extension Pack. The commands work as follows:
- fresh=$(...): We save the command between the brackets in a variable, which reads the latest Vbox version. It works as follows:
- wget: A program for downloading binary files from the web via HTTP or FTP. The parameters obtained are:
- -q (--quiet): Silent mode. wget does not print any process information to the screen, it only passes on the downloaded content.
- -O - (--output-document=-): The downloaded content is written to the standard output of the command line instead of being saved to a file.
- wget: A program for downloading binary files from the web via HTTP or FTP. The parameters obtained are:
- extpack_file=$(...): We save the command between the brackets in another variable, which filters out the name of the file we need. It works as follows:
- curl: A versatile command line tool for downloading or sending data. Here we are using it to request the HTML content of the VirtualBox download page. The parameters received are:
- -s (--silent): Quiet mode. Curl hides the progress bar and errors, so only the pure HTML content is output, which is essential for scripting.
- grep after first pipeline: We pass the entire HTML content downloaded by curl to the first grep command, which performs a special filtering. The resulting parameters and matching pattern are:
- -o (--only-matching): grep only prints the exact match, not the entire line. This "cuts" the links out of the HTML code.
- -P (--perl-regexp): It allows the use of Perl-compatible regular expressions, which can handle much more advanced patterns.
- '(?<=href=")[^"]+': This regular expression will search for all
href="..."attribute and returns only the contents between the quotes (the filenames).
- grep after second pipeline: We pass the list of all filenames collected by the previous command to a second grep, which selects the one that is suitable for us. The resulting matching pattern is:
- "${fresh}\.vbox-extpack": This pattern looks for the single line that contains the previously saved version number (
${friss}), a period character (the\is not interpreted as a wildcard character because of this), and the.vbox-extpackextension. This filters out any other file in the directory that also contains the value build in its name, limiting the final output of curl to a single filename that can be safely passed into a variable for later use.
- "${fresh}\.vbox-extpack": This pattern looks for the single line that contains the previously saved version number (
- curl: A versatile command line tool for downloading or sending data. Here we are using it to request the HTML content of the VirtualBox download page. The parameters received are:
- threw out: To check, we print the searched file name in
$extpack_filevariable. If we create a script from it, we can run the installation command later with this variable.
So here we can see that this is also a unique solution, in which we adapt to the internal structure of the current library, which allows us to build a script that can be used in the long term. If the creators of Virtualbox change something again later, then thanks to the extreme flexibility of the above tools, we can track the changes again.
Now that the exact filename is in a variable, downloading is a breeze. Navigate to the /tmp directory and download the file using wget with the command.
cd /tmp
wget "http://download.virtualbox.org/virtualbox/${friss}/${extpack_file}"
Installation and inspection
The downloaded extension can be installed using the VBoxManage command. The --replace switch ensures that if an older version was already installed, it will be overwritten.
VBoxManage extpack install --replace "${extpack_file}"
When you run the command, the license agreement will appear in the terminal. You must accept it to continue the installation, by typing 'y' and then pressing Enter.
After a successful installation, perform a final check, both from the command line and in the graphical interface.
VBoxManage list extpacks
The command output now shows details of the installed extension, including the exact version number.
If we open the extension manager in the VirtualBox graphical interface, we can see that the list is no longer empty, the 7.2.4 Extension Pack has been successfully installed and is active.
The main program and the extension package are now in perfect sync. There is only one step left: updating the "Guest Extensions" running in the guest operating systems.
The last link in the chain: the Guest Additions update
The third and final step in the VirtualBox upgrade process is to update the "Guest Additions", the driver and software package installed in guest operating systems. The version of this package should always match the version of VirtualBox running on the host system, as this ensures seamless integration, including:
- bidirectional use of the clipboard,
- the "drag and drop" function,
- dynamic screen resizing,
- and advanced graphics capabilities like 3D acceleration.
The changed installation process in version 7
One of the most impressive innovations in VirtualBox 7.x is the modernization of the Guest Additions installation process. While in previous versions, clicking on the menu item mounted a virtual CD-ROM in the guest system, which we had to open and manually start the installer, the new version almost completely automates this process.
Start the virtual machine you want to update (in our example, a Windows 10), then select in the menu bar of the machine window Tools -> Install Integration Services menu item. Or if it was previously installed, then the ...update select an option.
Instead of the old CD mount, a new sidebar appears on the right edge of the virtual machine window, informing you about the process and showing the installation status on a progress bar. The installation is done in the background, more deeply integrated, without user intervention.
At the end of the process, the guest operating system must be restarted so that the new drivers can be loaded.
Checking the result on the guest system
After the restart, the change will be felt immediately. The screen resolution will automatically adjust to the host window size, and higher resolutions will appear in the Display settings.
If we look in the Windows Device Manager, we will see the updated "VirtualBox Graphics Adapter (WDDM)" driver under Video Cards, confirming the successful installation.
This brings all three elements of the update chain into place: the main VirtualBox program, the Extension Pack, and the Guest Additions all run on the latest version, 7.2.4, ensuring maximum performance and functionality.
Conclusion
Maintaining VirtualBox after a distribution upgrade can seem daunting at first, but as we have seen, it is a logical three-step process. The key is synchronization: the main program, expanding the functions Extension Pack, and integrating into the guest system Guest Additions The versions must all match.
This update not only fixes hidden bugs and version mismatch issues, but also brings the new capabilities of VirtualBox 7.2. A modernized graphical interface, a simplified Guest Additions installer, and continuous performance improvements all contribute to a more efficient virtualization environment.
After a successful upgrade, previously problematic settings, such as 3D acceleration, will work smoothly again, and our virtual machines will perform at their best on our new Debian system.
With this maintenance, we ensured that our VirtualBox environment would remain stable and reliable in the future, ready to host new virtual machines and work smoothly.
- Install VirtualBox 5.2 on Debian 9 (stretch) host operating system
- Install VirtualBox 6.0.x on Debian 10 (Buster) host operating system
- Install VirtualBox 6.1.x on Debian 10 (Buster) host operating system
- Encyclopedia - VirtualBox
- How to upgrade your home computer from Debian 8 (Jessie) to Debian 9 (Stretch)
- How to upgrade your perfect Debian9 (Stretch) based server to Debian 10 (Buster)
- How to upgrade our perfect server based on Debian 10 (Buster) to Debian 11 (Bullseye)
- To post registration and login required
- 146 views




















