Reboot after guest additions rebuild?

Discussions about using Linux guests in VirtualBox.
Post Reply
HarryMan
Posts: 113
Joined: 15. Jan 2014, 13:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: devuan, MX-Linux, others

Reboot after guest additions rebuild?

Post by HarryMan »

Rebuilding the guest additions in a VirtualBox guest running version 6.1.36 (and possibly earlier versions), I see the following

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.36 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.36 of VirtualBox Guest Additions...
vboxadd-service.sh: Stopping VirtualBox Guest Addition service.
You may need to restart your guest system to finish removing guest drivers.
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
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-16-amd64.
VirtualBox Guest Additions: Running kernel modules will not be replaced until 
the system is restarted
VirtualBox Guest Additions kernel modules 6.1.36 r152435 are
already available for kernel 5.10.0-16-amd64 and do not require to be rebuilt.
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
Note the last 2 messages emitted by the build process: It seems to be saying that the Guest Additions are already available for the kernel and do not need to be rebuilt. But the very next message--which was already emitted earlier--admonishes us to restart the VM in order to replace the kernel modules.

At least from a very cursory view, these messages seem to contradict each other, which leads one to question the need to restart the VM for the update to take effect. As a precaution, I always restart a VM after any guest additions update. But I wonder if this might be unnecessary, at least in some cases. If not, could these messages be made clearer to prevent confusion?
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Reboot after guest additions rebuild?

Post by arQon »

If you look at the *first* few messages rather than just the last few, you'll probably be able to answer all your questions yourself. :)
HarryMan
Posts: 113
Joined: 15. Jan 2014, 13:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: devuan, MX-Linux, others

Re: Reboot after guest additions rebuild?

Post by HarryMan »

arQon wrote:If you look at the *first* few messages rather than just the last few, you'll probably be able to answer all your questions yourself. :)
Would you reboot, or would you NOT reboot? If I could answer this myself, I never would have posted.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Reboot after guest additions rebuild?

Post by scottgus1 »

I think what arQon was highlighting is this:
HarryMan wrote:You may need to restart your guest system to finish removing guest drivers.
It could be that there is a contradiction in the final messages. But it could also be that two different things are being discussed.

I would reboot for Guest Additions. Windows GAs always require a reboot. Couldn't hurt for Linux.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Reboot after guest additions rebuild?

Post by arQon »

Sorry, that was apparently less obvious than I thought.
Removing installed version 6.1.36 of VirtualBox Guest Additions...
You were running 6.1.36. You then removed it, and rebuilt it, and then reinstalled it. I don't know why you imagine that would have any net effect, but it doesn't.

None of the instructions re what you "may" need to do apply, because you aren't changing anything, and that includes adding or removing anything. Before and after, you have the same binaries in the same places. There is no "potential final step" required from you after that, because nothing is different except the timestamps on the files.
HarryMan
Posts: 113
Joined: 15. Jan 2014, 13:54
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: devuan, MX-Linux, others

Re: Reboot after guest additions rebuild?

Post by HarryMan »

I propose to change the messages so it will be clear to the admin or user as to whether a reboot is NECESSARY.

The current messages are contradictory, even if only seemingly/superficially. And this is regardless of the precise cause of the apparent contradiction. Users should not have to attempt to debug the minds of those who create and maintain the software, as they probably have other things to tend to. It is always best for the devs of the respective packages to support them since they work with the code every day and are most familiar with it.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Reboot after guest additions rebuild?

Post by scottgus1 »

Determining whether a reboot is necessary might be a difficult paradigm to program. And if it's got a glitch, then we'd be faced with folks asking "Why did my VM crash due to needing a Guest Additions reboot and the installer told me a reboot wasn't necessary?"

We can give your PM link to them so they can get an explanation of why the glitch happened. :wink: :lol: :D JK.

The answer to this is easy:

Reboot after installing Guest Additions.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: Reboot after guest additions rebuild?

Post by chrisretusn »

I'm on a Slackware64-current host running a Slackware64-current guest. This is what I get on installation.

Code: Select all

# /mnt/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.38 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
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.19.6.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
./routines.sh: line 239: systemctl: command not found
VirtualBox Guest Additions kernel modules 6.1.38 r153438 are
already available for kernel 5.19.6 and do not require to be rebuilt.
Running kernel modules will not be replaced until the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
I agree with @HarryMan, as you can see below, lsmod ran immediately after, the VirtualBox Guest Addition is indeed installed.

Code: Select all

# lsmod | grep vbox
vboxvideo              49152  0
drm_ttm_helper         16384  2 vmwgfx,vboxvideo
ttm                    81920  3 vmwgfx,vboxvideo,drm_ttm_helper
drm_kms_helper        180224  2 vmwgfx,vboxvideo
drm                   622592  6 vmwgfx,drm_kms_helper,vboxvideo,drm_ttm_helper,ttm
vboxguest              45056  1
This is what I get with a reboot.

Code: Select all

VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: VirtualBox Guest Additions kernel modules 6.1.38
r153438 are
VirtualBox Guest Additions: already available for kernel 5.19.6 and do not
require to be rebuilt.
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
This is even more inconsistent. It tells the modules are already available and do not require a reboot, then it tells me that running modules will not be replaced until the system is restarted. (Ah, I was just restarted). Then it tell me it is starting the service. I has started, same result from lsmod above or am I expected to reboot continuously. ;)

I will say this. It is an small improvement over 6.1.35 (and below) which produced this output at every boot. See my post here.

Code: Select all

### Every boot.
VirtualBox Guest Additions: Starting.
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: Running kernel modules will not be replaced until
the system is restarted
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
There is also the issue of "./routines.sh: line 239: systemctl: command not found" which occurs in both the host and guest on installing. Slackware does not use systemd. The error appears to be harmless as VirtualBox is work just fine on both my host and guest but it shouldn't be there.
Post Reply