dotless-de / vagrant-vbguest

A Vagrant plugin to keep your VirtualBox Guest Additions up to date
MIT License
2.88k stars 207 forks source link

Error with virtualbox 7.0.2 #425

Closed meaz closed 10 months ago

meaz commented 2 years ago

I deploy a debian 11 box with vagrant (I'm on Arch, with virtualbox 7.0.2).

Here is what I get:

GuestAdditions versions on your host (7.0.2) and guest (6.1.36) do not match.
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version (2.8.4-3).
linux-headers-5.10.0-18-amd64 is already the newest version (5.10.140-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
Installing Virtualbox Guest Additions 7.0.2 - guest version is 6.1.36
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.2 Guest Additions for Linux  100%  
VirtualBox Guest Additions installer
Removing installed version 6.1.36 of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-5.10.0-18-amd64
/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
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 <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 5.10.0-18-amd64.
update-initramfs: Generating /boot/initrd.img-5.10.0-18-amd64
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
An error occurred during installation of VirtualBox Guest Additions 7.0.2. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
Unmounting Virtualbox Guest Additions ISO from: /mnt
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.36
VBoxService inside the vm claims: 7.0.2
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.36
VBoxService inside the vm claims: 7.0.2
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.1.36
VBoxService inside the vm claims: 7.0.2
Going on, assuming VBoxService is correct...
Restarting VM to apply changes...

As you can see it's struggling installing GuestAdditions 7.0.2.

When I restart the box withvagrant up, I do have issues again:

/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
update-initramfs: Generating /boot/initrd.img-5.10.0-18-amd64
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 <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 5.10.0-18-amd64.
update-initramfs: Generating /boot/initrd.img-5.10.0-18-amd64
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
Restarting VM to apply changes...

however, I can vagrant ssh without issue.

I don't understand where the problem comes from: virtualbox? virtualbox-guest-iso? vagrant? vagrant-vbguest? neither how to fix it.

mloskot commented 1 year ago

My environment: Vagrant 2.3.4 on Windows 11 with Virtual Box 7.0

It looks like it is a known issue and other Debian-based distro boxes may suffer from it too, namely I'm seeing this problem on Ubuntu 20.04, 22.04 and 22.10:

Vagrant.configure("2") do |config|
  config.vagrant.plugins = ["vagrant-vbguest"]
  config.vm.box = "roboxes/ubuntu2204"
end

will fail with

vagrant up log ``` Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'roboxes/ubuntu2204'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'roboxes/ubuntu2204' version '4.2.14' is up to date... ==> default: Setting the name of the VM: roboxes-ubuntu2204_default_1681930308950_24374 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... ==> default: Machine booted and ready! Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 6.1.38 Going on, assuming VBoxService is correct... [default] A Virtualbox Guest Additions installation was found but no tools to rebuild or start them. Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 6.1.38 Going on, assuming VBoxService is correct... Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package virtualbox-guest-dkms Reading package lists... Building dependency tree... Reading state information... linux-headers-5.15.0-60-generic is already the newest version (5.15.0-60.66). linux-headers-5.15.0-60-generic set to manually installed. The following additional packages will be installed: bzip2 cpp cpp-11 cpp-12 dctrl-tools dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto Suggested packages: bzip2-doc cpp-doc gcc-11-locales gcc-12-locales debtags menu debian-keyring g++-multilib g++-11-multilib gcc-11-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-11-multilib gcc-12-multilib gcc-12-doc glibc-doc bzr libgd-tools libstdc++-11-doc make-doc The following NEW packages will be installed: build-essential bzip2 cpp cpp-11 cpp-12 dctrl-tools dkms dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto 0 upgraded, 59 newly installed, 0 to remove and 4 not upgraded. Need to get 208 MB of archives. After this operation, 673 MB of additional disk space will be used. ...snip... Get:34 https://mirrors.edge.kernel.org/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [252 B] Fetched 6,453 kB in 4s (1,441 kB/s) Reading package lists... W: --force-yes is deprecated, use one of the options starting with --allow instead. Reading package lists... Building dependency tree... Reading state information... linux-headers-5.15.0-60-generic is already the newest version (5.15.0-60.66). linux-headers-5.15.0-60-generic set to manually installed. The following additional packages will be installed: bzip2 cpp cpp-11 cpp-12 dctrl-tools dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto Suggested packages: bzip2-doc cpp-doc gcc-11-locales gcc-12-locales debtags menu debian-keyring g++-multilib g++-11-multilib gcc-11-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-11-multilib gcc-12-multilib gcc-12-doc glibc-doc bzr libgd-tools libstdc++-11-doc make-doc The following NEW packages will be installed: build-essential bzip2 cpp cpp-11 cpp-12 dctrl-tools dkms dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto 0 upgraded, 59 newly installed, 0 to remove and 77 not upgraded. Need to get 1,522 kB/208 MB of archives. After this operation, 673 MB of additional disk space will be used. Get:1 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 linux-libc-dev amd64 5.15.0-70.77 [1,339 kB] Get:2 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 libtiff5 amd64 4.3.0-6ubuntu0.4 [183 kB] Fetched 1,522 kB in 1s (1,102 kB/s) Selecting previously unselected package gcc-11-base:amd64. ...snip... Setting up g++-11 (11.3.0-1ubuntu1~22.04) ... Setting up dkms (2.8.7-2ubuntu2.1) ... Setting up g++ (4:11.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.9ubuntu3) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.15.0-60-generic NEEDRESTART-KEXP: 5.15.0-60-generic NEEDRESTART-KSTA: 1 Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Mounting Virtualbox Guest Additions ISO to: /mnt mount: /mnt: WARNING: source write-protected, mounted read-only. Installing Virtualbox Guest Additions 7.0.6 - guest version is 6.1.38 Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing VirtualBox 7.0.6 Guest Additions for Linux 100% VirtualBox Guest Additions installer VBoxControl: error: Could not contact the host system. Make sure that you are running this VBoxControl: error: application inside a VirtualBox guest system, and that you have sufficient VBoxControl: error: user permissions. This system appears to have a version of the VirtualBox Guest Additions already installed. If it is part of the operating system and kept up-to-date, there is most likely no need to replace it. If it is not up-to-date, you should get a notification when you start the system. If you wish to replace it with this version, please do not continue with this installation now, but instead remove the current version first, following the instructions for the operating system. If your system simply has the remains of a version of the Additions you could not remove you should probably continue now, and these will be removed during installation. Do you wish to continue? [yes or no] touch: cannot touch '/var/lib/VBoxGuestAdditions/skip-5.15.0-60-generic': No such file or directory /opt/VBoxGuestAdditions-7.0.6/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory /opt/VBoxGuestAdditions-7.0.6/bin/VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory 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 5.15.0-60-generic. update-initramfs: Generating /boot/initrd.img-5.15.0-60-generic Unmounting Virtualbox Guest Additions ISO from: /mnt ==> default: Checking for guest additions in VM... ```

See https://askubuntu.com/a/1437555/139530 for workaround and based on that I found a solution using the installer_hooks:

Vagrant.configure("2") do |config|
  config.vagrant.plugins = ["vagrant-vbguest"]

  config.vm.box = "roboxes/ubuntu2204"

  config.vbguest.installer_options = { allow_kernel_upgrade: true }
  config.vbguest.installer_hooks[:before_install] = [
    "apt-get update",
    "apt-get -y install libxt6 libxmu6"
  ]
  config.vbguest.installer_hooks[:after_install] = [
    "VBoxClient --version"
  ]
end

will succeed printing the VBoxClient --version:

vagrant up log ``` Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'roboxes/ubuntu2204'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'roboxes/ubuntu2204' version '4.2.14' is up to date... ==> default: A newer version of the box 'roboxes/ubuntu2204' for provider 'virtualbox' is ==> default: available! You currently have version '4.2.14'. The latest is version ==> default: '4.2.16'. Run `vagrant box update` to update. ==> default: Setting the name of the VM: roboxes-ubuntu2204_default_1681929848012_77677 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection reset. Retrying... default: Warning: Connection aborted. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... ==> default: Machine booted and ready! Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 6.1.38 Going on, assuming VBoxService is correct... [default] A Virtualbox Guest Additions installation was found but no tools to rebuild or start them. Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 6.1.38 Going on, assuming VBoxService is correct... ==> default: Executing pre-install hooks Hit:1 https://mirrors.edge.kernel.org/ubuntu jammy InRelease ...snip... Fetched 6,453 kB in 8s (841 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libice6 libsm6 x11-common The following NEW packages will be installed: libice6 libsm6 libxmu6 libxt6 x11-common 0 upgraded, 5 newly installed, 0 to remove and 77 not upgraded. Need to get 309 kB of archives. After this operation, 1,102 kB of additional disk space will be used. Get:1 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 x11-common all 1:7.7+23ubuntu2 [23.4 kB] Get:2 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 libice6 amd64 2:1.0.10-1build2 [42.6 kB] Get:3 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 libsm6 amd64 2:1.2.3-1build2 [16.7 kB] Get:4 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 libxt6 amd64 1:1.2.1-1 [177 kB] Get:5 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 libxmu6 amd64 2:1.1.3-3 [49.6 kB] dpkg-preconfigure: unable to re-open stdin: No such file or directory Fetched 309 kB in 1s (287 kB/s) Selecting previously unselected package x11-common. (Reading database ... 75640 files and directories currently installed.) Preparing to unpack .../x11-common_1%3a7.7+23ubuntu2_all.deb ... Unpacking x11-common (1:7.7+23ubuntu2) ... Selecting previously unselected package libice6:amd64. Preparing to unpack .../libice6_2%3a1.0.10-1build2_amd64.deb ... Unpacking libice6:amd64 (2:1.0.10-1build2) ... Selecting previously unselected package libsm6:amd64. Preparing to unpack .../libsm6_2%3a1.2.3-1build2_amd64.deb ... Unpacking libsm6:amd64 (2:1.2.3-1build2) ... Selecting previously unselected package libxt6:amd64. Preparing to unpack .../libxt6_1%3a1.2.1-1_amd64.deb ... Unpacking libxt6:amd64 (1:1.2.1-1) ... Selecting previously unselected package libxmu6:amd64. Preparing to unpack .../libxmu6_2%3a1.1.3-3_amd64.deb ... Unpacking libxmu6:amd64 (2:1.1.3-3) ... Setting up x11-common (1:7.7+23ubuntu2) ... Setting up libice6:amd64 (2:1.0.10-1build2) ... Setting up libsm6:amd64 (2:1.2.3-1build2) ... Setting up libxt6:amd64 (1:1.2.1-1) ... Setting up libxmu6:amd64 (2:1.1.3-3) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... Running kernel seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package virtualbox-guest-dkms Reading package lists... Building dependency tree... Reading state information... linux-headers-5.15.0-60-generic is already the newest version (5.15.0-60.66). linux-headers-5.15.0-60-generic set to manually installed. The following additional packages will be installed: bzip2 cpp cpp-11 cpp-12 dctrl-tools dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto Suggested packages: bzip2-doc cpp-doc gcc-11-locales gcc-12-locales debtags menu debian-keyring g++-multilib g++-11-multilib gcc-11-doc gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-11-multilib gcc-12-multilib gcc-12-doc glibc-doc bzr libgd-tools libstdc++-11-doc make-doc The following NEW packages will be installed: build-essential bzip2 cpp cpp-11 cpp-12 dctrl-tools dkms dpkg-dev fakeroot fontconfig-config fonts-dejavu-core g++ g++-11 gcc gcc-11 gcc-11-base gcc-12 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libasan8 libatomic1 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0 libdpkg-perl libfakeroot libfile-fcntllock-perl libfontconfig1 libgcc-11-dev libgcc-12-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libstdc++-11-dev libtiff5 libtirpc-dev libtsan0 libtsan2 libubsan1 libwebp7 libxpm4 linux-libc-dev lto-disabled-list make manpages-dev rpcsvc-proto 0 upgraded, 59 newly installed, 0 to remove and 77 not upgraded. Need to get 208 MB of archives. After this operation, 673 MB of additional disk space will be used. Get:1 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 gcc-11-base amd64 11.3.0-1ubuntu1~22.04 [20.8 kB] ...snip... Get:59 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 manpages-dev all 5.10-1ubuntu1 [2,309 kB] Fetched 208 MB in 1min 57s (1,775 kB/s) Selecting previously unselected package gcc-11-base:amd64. (Reading database ... 75690 files and directories currently installed.) ...snip... Setting up libstdc++-11-dev:amd64 (11.3.0-1ubuntu1~22.04) ... Setting up libc-devtools (2.35-0ubuntu3.1) ... Setting up g++-11 (11.3.0-1ubuntu1~22.04) ... Setting up dkms (2.8.7-2ubuntu2.1) ... Setting up g++ (4:11.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.9ubuntu3) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.15.0-60-generic NEEDRESTART-KEXP: 5.15.0-60-generic NEEDRESTART-KSTA: 1 Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Mounting Virtualbox Guest Additions ISO to: /mnt mount: /mnt: WARNING: source write-protected, mounted read-only. Installing Virtualbox Guest Additions 7.0.6 - guest version is 6.1.38 Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing VirtualBox 7.0.6 Guest Additions for Linux 100% VirtualBox Guest Additions installer VBoxControl: error: Could not contact the host system. Make sure that you are running this VBoxControl: error: application inside a VirtualBox guest system, and that you have sufficient VBoxControl: error: user permissions. This system appears to have a version of the VirtualBox Guest Additions already installed. If it is part of the operating system and kept up-to-date, there is most likely no need to replace it. If it is not up-to-date, you should get a notification when you start the system. If you wish to replace it with this version, please do not continue with this installation now, but instead remove the current version first, following the instructions for the operating system. If your system simply has the remains of a version of the Additions you could not remove you should probably continue now, and these will be removed during installation. Do you wish to continue? [yes or no] touch: cannot touch '/var/lib/VBoxGuestAdditions/skip-5.15.0-60-generic': No such file or directory 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 5.15.0-60-generic. update-initramfs: Generating /boot/initrd.img-5.15.0-60-generic ==> default: Executing post-install hooks 7.0.6r155176 Unmounting Virtualbox Guest Additions ISO from: /mnt ==> default: Checking for guest additions in VM... ```