VirtualBox

Opened 6 years ago

Last modified 5 years ago

#18554 new defect

systemd startup script not updated during guest additions install

Reported by: Chuck Donahue Owned by:
Component: shared folders Version: VirtualBox 6.0.4
Keywords: shared folders systemd Cc:
Guest type: Linux Host type: Windows

Description

Environment:
Host: Windows 10 Enterprise
Guest: Linux Mint 19.1

I upgraded my host Virtualbox install from version 5.2.26 to 6.0.4
After booting the Linux Mint guest I was prompted to update the virtualbox guest additions.

This appears to install correctly, however when rebooting the guest, vbox shared folders don't appear to mount.

I eventually traced the issue down to the systemd startup script located in /etc/systemd/system/vboxadd-service.service

When querying the status of the service startup after updating to guest additions version 6.0.4 this error is shown:

Apr 09 14:06:21 Mint-19 systemd[4423]: vboxadd-service.service: Failed at step EXEC spawning /opt/VBoxGuestAdditions-5.2.26/init/vboxadd-service: No such file or directory

I then manually edited the /etc/systemd/system/vboxadd-service.service service file and changed all entries for the path /opt/VBoxGuestAdditions-5.2.26/ to the path /opt/VBoxGuestAdditions-6.0.4/

I then reloaded systemd and started up the vboxadd-service successfully, with host shared folders mounting on the guest as expected

Change History (4)

comment:1 by Chuck Donahue, 6 years ago

After further research I have found that the version 6.0.4 guest additions created the proper systemd startup script in /lib/systemd/system/vboxadd-service.service

However, the older existing systemd startup script in /etc/systemd/system/vboxadd-service.service took precedence over the newer script.

Suggestion to fix. Ensure the version 6.0.4 guest additions installer removes any older systemd script prior to creating it's own.

comment:2 by Michael Thayer, 6 years ago

I don't think we have ever put things into /etc/systemd, so it is probably not a good idea to delete them from there. Some other course of action might make sense if you can find out how they got there. Did you partially but not completely remove Guest Additions provided by the system?

comment:3 by Chuck Donahue, 6 years ago

I just did the install over the previous version. Maybe something to do with my Mint 19 install. I did the same process on my Zorin OS install and had no issues.

comment:4 by Qtax, 5 years ago

Same bug when upgrading from 6.0.4 to 6.0.10, causing VBoxService not to start on a Ubuntu 18.04 guest. (VBoxClient on the other hand is running and seems to have been upgraded without issues.)

The old 6.0.4 file /etc/systemd/system/vboxadd-service.service which contains paths to the old guest additions (/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service) seems to override the new 6.0.10 file at /lib/systemd/system/vboxadd-service.service.

To solve the issue I removed the old /etc/systemd/system/vboxadd-service.service file.

Host: Windows 10 Pro
Guest: Ubuntu 18.04 LTS (Xubuntu)

$ systemctl status vboxadd-service
Warning: The unit file, source configuration file or drop-ins of vboxadd-service.service changed on disk. Run 'systemctl daemon-reload' to reload units.
? vboxadd-service.service
   Loaded: loaded (/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-07-29 13:53:19 CEST; 7min ago
  Process: 1735 ExecStart=/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service start (code=exited, status=203/EXEC)

Jul 29 13:53:19 joe systemd[1]: Starting vboxadd-service.service...
Jul 29 13:53:19 joe systemd[1735]: vboxadd-service.service: Failed to execute command: No such file or directory
Jul 29 13:53:19 joe systemd[1735]: vboxadd-service.service: Failed at step EXEC spawning /opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service: No such file or directory
Jul 29 13:53:19 joe systemd[1]: vboxadd-service.service: Control process exited, code=exited status=203
Jul 29 13:53:19 joe systemd[1]: vboxadd-service.service: Failed with result 'exit-code'.
Jul 29 13:53:19 joe systemd[1]: Failed to start vboxadd-service.service.

$ systemctl cat vboxadd-service.service
# Warning: vboxadd-service.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
# /etc/systemd/system/vboxadd-service.service
[Unit]
SourcePath=/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service
Description=
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target 
After=vboxadd.service 
Conflicts=shutdown.target systemd-timesyncd.service

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service start
ExecStop=/opt/VBoxGuestAdditions-6.0.4/init/vboxadd-service stop

[Install]
WantedBy=multi-user.target

$ cat /lib/systemd/system/vboxadd-service.service
[Unit]
SourcePath=/opt/VBoxGuestAdditions-6.0.10/init/vboxadd-service
Description=
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target 
After=vboxadd.service 
Conflicts=shutdown.target systemd-timesyncd.service

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/opt/VBoxGuestAdditions-6.0.10/init/vboxadd-service start
ExecStop=/opt/VBoxGuestAdditions-6.0.10/init/vboxadd-service stop

[Install]
WantedBy=multi-user.target
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette