In my previous blog post I’ve described how to install PhpVirtalbox version 6.x however jazzdd released a new version Jenkins. In this post I’m describing my journey to update to version 7.x, since the frontend is not compatible with the older version of virtualbox :/.

PhpVirtualbox 7.x is not compatible with 7.0

PhpVirtualbox 7.x is not compatible with 7.0

Removing the old version of Virtualbox

No big surprises here, and if you’re trying to follow allong. If no version of Virtualbox was installed you can skip this step. If it is installed, do not forget to switch off vboxwebsrv.

Then first make sure we get the right version of virtualbox to be removed:

# apt list | grep virtualbox

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

virtualbox-6.1/now 6.1.40-154048~Debian~bullseye amd64 [installed,local]

And remove it with:

# apt remove virtualbox-6.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gcc libasyncns0 libcaca0 libdouble-conversion3 libegl-mesa0 libegl1 libevdev2 libflac8 libgbm1 libgudev-1.0-0 libinput-bin libinput10 libmd4c0 libmtdev1 libogg0 libopus0 libpcre2-16-0 libpulse0 libqt5core5a libqt5dbus5 libqt5gui5
  libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian libsndfile1 libvorbis0a libvorbisenc2 libvpx6 libwacom-bin libwacom-common libwacom2 libwayland-server0
  libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxkbcommon-x11-0 linux-headers-amd64 qt5-gtk-platformtheme qttranslations5-l10n
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libudev1 udev
The following packages will be REMOVED:
  virtualbox-6.1
The following packages will be upgraded:
  libudev1 udev
2 upgraded, 0 newly installed, 1 to remove and 91 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,633 kB of archives.
After this operation, 222 MB disk space will be freed.
Do you want to continue? [Y/n] 
Reading changelogs... Done
(Reading database ... 132343 files and directories currently installed.)
Preparing to unpack .../udev_247.3-7+deb11u4_amd64.deb ...
Unpacking udev (247.3-7+deb11u4) over (247.3-7+deb11u1) ...
Preparing to unpack .../libudev1_247.3-7+deb11u4_amd64.deb ...
Unpacking libudev1:amd64 (247.3-7+deb11u4) over (247.3-7+deb11u1) ...
Setting up libudev1:amd64 (247.3-7+deb11u4) ...
(Reading database ... 132343 files and directories currently installed.)
Removing virtualbox-6.1 (6.1.40-154048~Debian~bullseye) ...
Setting up udev (247.3-7+deb11u4) ...
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-26-amd64
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for shared-mime-info (2.0-1) ...
Processing triggers for mailcap (3.69) ...

Installing the new version

Since according to the Debian wiki to install Virtualbox on Debian 10 “Buster”, Debian 11 “Bullseye”, and Debian 12 “Bookworm”, I went and installed the Fast Track repository (see https://wiki.debian.org/VirtualBox#Debian_10_.22Buster.22.2C_Debian_11_.22Bullseye.22.2C_and_Debian_12_.22Bookworm.22) However, this ended up not working…

Adding fasttrack repo

# apt install fasttrack-archive-keyring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gcc libasyncns0 libcaca0 libdouble-conversion3 libegl-mesa0 libegl1 libevdev2 libflac8 libgbm1 libgudev-1.0-0 libinput-bin libinput10 libmd4c0 libmtdev1 libogg0 libopus0 libpcre2-16-0 libpulse0 libqt5core5a libqt5dbus5 libqt5gui5
  libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5 libsdl-ttf2.0-0 libsdl1.2debian libsndfile1 libvorbis0a libvorbisenc2 libvpx6 libwacom-bin libwacom-common libwacom2 libwayland-server0
  libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 libxcb-xkb1 libxkbcommon-x11-0 linux-headers-amd64 qt5-gtk-platformtheme qttranslations5-l10n
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  fasttrack-archive-keyring
0 upgraded, 1 newly installed, 0 to remove and 91 not upgraded.
Need to get 5,244 B of archives.
After this operation, 16.4 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 fasttrack-archive-keyring all 2020.12.19 [5,244 B]
Fetched 5,244 B in 0s (73.4 kB/s)                    
Selecting previously unselected package fasttrack-archive-keyring.
(Reading database ... 131581 files and directories currently installed.)
Preparing to unpack .../fasttrack-archive-keyring_2020.12.19_all.deb ...
Unpacking fasttrack-archive-keyring (2020.12.19) ...
Setting up fasttrack-archive-keyring (2020.12.19) ...

Make sure the following lines exist in /etc/apt/sources.list, which point to the repo:

deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib

Update local repo:

# apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:4 https://download.docker.com/linux/debian bullseye InRelease                                                                            
Get:5 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack InRelease [12.9 kB]                  
Get:6 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging InRelease [12.9 kB]
Get:7 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack/main amd64 Packages [28.7 kB]
Get:8 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack/main Translation-en [19.0 kB]
Get:9 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack/contrib amd64 Packages [7,216 B]
Get:10 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack/contrib Translation-en [1,888 B]
Get:11 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging/main amd64 Packages [37.2 kB]
Get:12 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging/main Translation-en [31.9 kB]
Get:13 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging/contrib amd64 Packages [500 B]
Get:14 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging/contrib Translation-en [344 B]
Fetched 245 kB in 0s (594 kB/s)                  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
91 packages can be upgraded. Run 'apt list --upgradable' to see them.

If you get the line:

91 packages can be upgraded. Run 'apt list --upgradable' to see them.

Like I just did, do an upgrade:

# apt upgrade
... (skipping output, since this is not relevant for the post)

Installing Virtualbox 7 with

So now we should be able to install the Fast Track repository, however we get the following:

# apt install virtualbox                                                                                                                                                                                                  
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox : Depends: libtpms0 (>= 0.8.0~dev1) but it is not installable
              Recommends: virtualbox-qt (= 7.0.12-dfsg-1~fto11+1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So I went Googling a bit and found, on the debian forums that basically, it isn’t in either the normal nor the backports repo, and the better way would be just to install via the deb file. https://forums.debian.net/viewtopic.php?p=767762#p767762

Not the nicest way, but sure. So you can get the download link of the newest version for your version of Debian via here: https://www.virtualbox.org/wiki/Linux_Downloads

And then download it with wget:

# wget https://download.virtualbox.org/virtualbox/7.0.12/virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb
--2023-11-14 14:16:54--  https://download.virtualbox.org/virtualbox/7.0.12/virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb
Resolving download.virtualbox.org (download.virtualbox.org)... 23.36.244.76
Connecting to download.virtualbox.org (download.virtualbox.org)|23.36.244.76|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 92164336 (88M) [text/plain]
Saving to: ‘virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb’

virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb      100%[========================================================================================================================================>]  87.89M  38.5MB/s    in 2.3s    

2023-11-14 14:16:58 (38.5 MB/s) - ‘virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb’ saved [92164336/92164336]

And then just run the installer with:

# apt install ./virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done                   
Note, selecting 'virtualbox-7.0' instead of './virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb'                
The following package was automatically installed and is no longer required:
  docker-scan-plugin                                  
Use 'sudo apt autoremove' to remove it.     
The following additional packages will be installed:                                                                  
  libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5xml5    
Recommended packages:                              
  linux-image                                  
The following NEW packages will be installed:         
  libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5xml5 virtualbox-7.0                                                  
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.                                                        
Need to get 518 kB/92.7 MB of archives.
After this operation, 221 MB of additional disk space will be used.                                                   
Do you want to continue? [Y/n]   
Get:1 http://deb.debian.org/debian bullseye/main amd64 libqt5sql5 amd64 5.15.2+dfsg-9 [144 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libqt5help5 amd64 5.15.2-5 [143 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 libqt5xml5 amd64 5.15.2+dfsg-9 [147 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libqt5sql5-sqlite amd64 5.15.2+dfsg-9 [83.9 kB]                
Get:5 /home/user/virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb virtualbox-7.0 amd64 7.0.12-159484~Debian~bullseye [92.2 MB]                                                                                                         
Fetched 518 kB in 0s (1,068 kB/s)                          
Preconfiguring packages ...                    
Can't exec "/tmp/virtualbox-7.0.config.9DH267": Permission denied at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178.                                                                                                              
open2: exec of /tmp/virtualbox-7.0.config.9DH267 configure  failed: Permission denied at /usr/share/perl5/Debconf/ConfModule.pm line 59.                                                                                                     
Selecting previously unselected package libqt5sql5:amd64.                                                             
(Reading database ... 131589 files and directories currently installed.)                                              
Preparing to unpack .../libqt5sql5_5.15.2+dfsg-9_amd64.deb ...                                                        
Unpacking libqt5sql5:amd64 (5.15.2+dfsg-9) ...
Selecting previously unselected package libqt5help5:amd64.
Preparing to unpack .../libqt5help5_5.15.2-5_amd64.deb ...
Unpacking libqt5help5:amd64 (5.15.2-5) ...
Selecting previously unselected package libqt5xml5:amd64.
Preparing to unpack .../libqt5xml5_5.15.2+dfsg-9_amd64.deb ...                                                        
Unpacking libqt5xml5:amd64 (5.15.2+dfsg-9) ...
Selecting previously unselected package virtualbox-7.0.
Preparing to unpack .../virtualbox-7.0_7.0.12-159484~Debian~bullseye_amd64.deb ...                                    
Unpacking virtualbox-7.0 (7.0.12-159484~Debian~bullseye) ...                                                          
Selecting previously unselected package libqt5sql5-sqlite:amd64.                                                      
Preparing to unpack .../libqt5sql5-sqlite_5.15.2+dfsg-9_amd64.deb ...                                                                                                                                                                        
Unpacking libqt5sql5-sqlite:amd64 (5.15.2+dfsg-9) ...                                                                                                                                                                                        
Setting up libqt5sql5:amd64 (5.15.2+dfsg-9) ...                                                                       
Setting up libqt5xml5:amd64 (5.15.2+dfsg-9) ...                                                                       
Setting up libqt5sql5-sqlite:amd64 (5.15.2+dfsg-9) ...
Setting up libqt5help5:amd64 (5.15.2-5) ...
Setting up virtualbox-7.0 (7.0.12-159484~Debian~bullseye) ...      
addgroup: The group `vboxusers' already exists as a system group. Exiting.                                            
Processing triggers for hicolor-icon-theme (0.17-2) ...                                                                                                                                                                                      
Processing triggers for libc-bin (2.31-13+deb11u7) ...     
Processing triggers for shared-mime-info (2.0-1) ...                                                                  
Processing triggers for mailcap (3.69) ...

To enable RDP access to the machines, you have to install the virtualbox extension pack too. You can get the link to the download from: https://www.virtualbox.org/wiki/Downloads Then download it:

wget https://download.virtualbox.org/virtualbox/7.0.12/Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpack

Uninstall the old pack:

# VBoxManage extpack uninstall "Oracle VM VirtualBox Extension Pack"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully uninstalled "Oracle VM VirtualBox Extension Pack".

Then install the new one:

# VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.12.vbox-extpack                 
VirtualBox Extension Pack Personal Use and Evaluation License (PUEL)     
                                                                                                                      
License version 11, 21 May 2020                                                                                       
                                                                                                                      
PLEASE READ THE FOLLOWING ORACLE VM VIRTUALBOX EXTENSION PACK PERSONAL 
USE AND EVALUATION LICENSE CAREFULLY BEFORE DOWNLOADING OR USING THE      
ORACLE SOFTWARE. THESE TERMS AND CONDITIONS CONSTITUTE A LEGAL AGREEMENT  
BETWEEN YOU AND ORACLE.                                                                                               

[... skipped ...]


Do you agree to these license terms and conditions (y/n)? y

License accepted. For batch installation add
--accept-license=****************************************************************
to the VBoxManage command line.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".

And finally don’t forget to start the virtualbox web server again at the end ( -H 0.0.0.0 opens it up to the whole network, and whatever can access it).

# vboxwebsrv -H 0.0.0.0

An then finally you should be able to load PhpVirtualbox again!

PhpVirtualbox 7.x is not compatible with 7.0

PhpVirtualbox 7.x is not compatible with 7.0