[opensuse-factory] Virtualbox systemd services cannot be disabled on Leap 15.2
Hi, after switching an important Win-something VM on a Leap 15.2 host from VB to libvirt, I noticed something strange. As you may know, libvirtd and vboxdrv are mutual exclusive services (while both are executed without errors, the latter runs into issues internally: $ sc status vboxdrv.service ● vboxdrv.service - VirtualBox Linux kernel module Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; disabled; vendor preset: disabled) Active: active (exited) since Mon 2020-08-31 15:19:20 CEST; 31min ago Process: 1480 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS) Tasks: 0 CGroup: /system.slice/vboxdrv.service Aug 31 15:19:20 tyrex systemd[1]: Starting VirtualBox Linux kernel module... Aug 31 15:19:20 tyrex vboxdrv.sh[1480]: vboxdrv.sh: Starting VirtualBox services. Aug 31 15:19:20 tyrex vboxdrv.sh[1578]: Starting VirtualBox services. Aug 31 15:19:20 tyrex vboxdrv.sh[1778]: VirtualBox services started. Aug 31 15:19:20 tyrex systemd[1]: Started VirtualBox Linux kernel module. $ sc status libvirtd.service ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled) Active: inactive (dead) since Mon 2020-08-31 15:21:30 CEST; 31min ago Docs: man:libvirtd(8) https://libvirt.org Process: 3904 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS) Main PID: 3904 (code=exited, status=0/SUCCESS) Aug 31 15:19:30 tyrex systemd[1]: Starting Virtualization daemon... Aug 31 15:19:31 tyrex systemd[1]: Started Virtualization daemon. Aug 31 15:19:36 tyrex libvirtd[3904]: libvirt version: 6.6.0 Aug 31 15:19:36 tyrex libvirtd[3904]: hostname: tyrex Aug 31 15:19:36 tyrex libvirtd[3904]: Unable to create KVM VM for TSC probing: Das Gerät oder die Ressource ist belegt A couple of issues are happening here: * vboxdrv is started, although disabled in systemd. (Yes, the system is rebooted after disabling). * libvirtd only notices its problem after being started This is with virtualbox 6.1.10 (as being delivered from openSUSE), and a current libvirt (home:frispete:15.2:kvm). I wasn't able to properly disable vboxdrv.service nor vboxautostart.service: I guess, that stems from the fact, that virtualbox perpetuates itself in: $ rpm -qf /usr/lib/systemd/system/multi-user.target.wants/vbox* virtualbox-6.1.10-lp152.2.2.1.x86_64 virtualbox-6.1.10-lp152.2.2.1.x86_64 which raises the questions, why and why does systemctl display these services as vendor preset: disabled? (See above) $ sc -al | grep vbox vboxautostart.service loaded active exited VirtualBox Linux autostart module vboxdrv.service loaded active exited VirtualBox Linux kernel module BTW, I checked all systemd user service locations to exclude such triggers, checked the /{etc,usr/lib}/systemd trees for related issues. Interestingly, I found a couple of dangling symlinks in /etc/systemd: $ find /etc/systemd -xtype l -ls 806136270 0 lrwxrwxrwx 1 root root 46 Jun 28 2016 /etc/ systemd/system/multi-user.target.wants/VBoxAutostart@hp.service -> /usr/lib/ systemd/system/VBoxAutostart@.service 806136277 0 lrwxrwxrwx 1 root root 37 Apr 28 2015 /etc/ systemd/system/multi-user.target.wants/fetchmail.service -> /etc/systemd/ system/fetchmail.service 538546328 0 lrwxrwxrwx 1 root root 45 Jun 23 23:32 /etc/ systemd/system/timers.target.wants/snapper-cleanup.timer -> /usr/lib/systemd/ system/snapper-cleanup.timer 538546329 0 lrwxrwxrwx 1 root root 46 Jun 23 23:32 /etc/ systemd/system/timers.target.wants/snapper-timeline.timer -> /usr/lib/systemd/ system/snapper-timeline.timer 269070440 0 lrwxrwxrwx 1 root root 43 Oct 26 2014 /etc/ systemd/system/sockets.target.wants/lvm2-lvmetad.socket -> /usr/lib/systemd/ system/lvm2-lvmetad.socket 806136313 0 lrwxrwxrwx 1 root root 44 Oct 26 2014 /etc/ systemd/system/sysinit.target.wants/lvm2-lvmetad.service -> /usr/lib/systemd/ system/lvm2-lvmetad.service 806136315 0 lrwxrwxrwx 1 root root 43 Apr 17 2019 /etc/ systemd/system/sysinit.target.wants/lvm2-lvmetad.socket -> /usr/lib/systemd/ system/lvm2-lvmetad.socket 539094329 0 lrwxrwxrwx 1 root root 54 Oct 26 2014 /etc/ systemd/system/system-update.target.wants/systemd-readahead-drop.service -> / usr/lib/systemd/system/systemd-readahead-drop.service which I tidied of course: $ find /etc/systemd -xtype l -delete Side note, examining /usr for dangling symlinks reveals an impressive number of broken packages: $ rpm -qf $(find /usr -xtype l) | uniq find: ‘/usr/share/groff/1.22.3/current’: Too many levels of symbolic links hunspell-1.6.2-lp152.3.9.x86_64 groff-full-1.22.3-lp152.5.52.x86_64 apcupsd-3.14.14-lp152.6.8.x86_64 python2-tornado-4.5.3-lp152.4.4.x86_64 python3-tornado-4.5.3-lp152.4.4.x86_64 vdr-plugin-epgsearch-2.4.0-lp152.48.1.x86_64 openldap2-2.4.46-lp152.14.3.1.x86_64 python3-Twisted-20.3.0-lp152.8.4.x86_64 tk-8.6.7-lp152.3.8.x86_64 libxslt-tools-1.1.32-lp152.5.1.x86_64 quilt-0.65-lp152.4.2.noarch Will deinstall virtualbox now, but wanted to keep these issues in pubic awareness. Cheers, Pete -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Mon, Aug 31, 2020 at 5:20 PM Hans-Peter Jansen <hpj@urpla.net> wrote:
$ sc status vboxdrv.service ● vboxdrv.service - VirtualBox Linux kernel module Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; disabled; vendor preset: disabled) ...
$ rpm -qf /usr/lib/systemd/system/multi-user.target.wants/vbox* virtualbox-6.1.10-lp152.2.2.1.x86_64 virtualbox-6.1.10-lp152.2.2.1.x86_64
which raises the questions, why and why does systemctl display these services as vendor preset: disabled? (See above)
Because "enabled" in systemd means "links from [Install] section are present" and those links cannot be in /usr/ib, they are only ever created in /etc/or /run. presets are unrelated to links in /usr/lib - they just say whether links in /etc should be created by default or not. There is no way to override .wanted et al links in /usr/lib. This was discussed several years ago without any practical consequences. So there is no way today packages can ship services "pre-enabled" allowing administrators to selectively disable them. I say this is a bug in virtualbox package.
$ sc -al | grep vbox vboxautostart.service loaded active exited VirtualBox Linux autostart module vboxdrv.service loaded active exited VirtualBox Linux kernel module
BTW, I checked all systemd user service locations to exclude such triggers, checked the /{etc,usr/lib}/systemd trees for related issues. Interestingly, I found a couple of dangling symlinks in /etc/systemd:
$ find /etc/systemd -xtype l -ls 806136270 0 lrwxrwxrwx 1 root root 46 Jun 28 2016 /etc/ systemd/system/multi-user.target.wants/VBoxAutostart@hp.service -> /usr/lib/ systemd/system/VBoxAutostart@.service 806136277 0 lrwxrwxrwx 1 root root 37 Apr 28 2015 /etc/ systemd/system/multi-user.target.wants/fetchmail.service -> /etc/systemd/ system/fetchmail.service 538546328 0 lrwxrwxrwx 1 root root 45 Jun 23 23:32 /etc/ systemd/system/timers.target.wants/snapper-cleanup.timer -> /usr/lib/systemd/ system/snapper-cleanup.timer 538546329 0 lrwxrwxrwx 1 root root 46 Jun 23 23:32 /etc/ systemd/system/timers.target.wants/snapper-timeline.timer -> /usr/lib/systemd/ system/snapper-timeline.timer 269070440 0 lrwxrwxrwx 1 root root 43 Oct 26 2014 /etc/ systemd/system/sockets.target.wants/lvm2-lvmetad.socket -> /usr/lib/systemd/ system/lvm2-lvmetad.socket 806136313 0 lrwxrwxrwx 1 root root 44 Oct 26 2014 /etc/ systemd/system/sysinit.target.wants/lvm2-lvmetad.service -> /usr/lib/systemd/ system/lvm2-lvmetad.service 806136315 0 lrwxrwxrwx 1 root root 43 Apr 17 2019 /etc/ systemd/system/sysinit.target.wants/lvm2-lvmetad.socket -> /usr/lib/systemd/ system/lvm2-lvmetad.socket 539094329 0 lrwxrwxrwx 1 root root 54 Oct 26 2014 /etc/ systemd/system/system-update.target.wants/systemd-readahead-drop.service -> / usr/lib/systemd/system/systemd-readahead-drop.service
which I tidied of course:
$ find /etc/systemd -xtype l -delete
Side note, examining /usr for dangling symlinks reveals an impressive number of broken packages:
$ rpm -qf $(find /usr -xtype l) | uniq find: ‘/usr/share/groff/1.22.3/current’: Too many levels of symbolic links hunspell-1.6.2-lp152.3.9.x86_64 groff-full-1.22.3-lp152.5.52.x86_64 apcupsd-3.14.14-lp152.6.8.x86_64 python2-tornado-4.5.3-lp152.4.4.x86_64 python3-tornado-4.5.3-lp152.4.4.x86_64 vdr-plugin-epgsearch-2.4.0-lp152.48.1.x86_64 openldap2-2.4.46-lp152.14.3.1.x86_64 python3-Twisted-20.3.0-lp152.8.4.x86_64 tk-8.6.7-lp152.3.8.x86_64 libxslt-tools-1.1.32-lp152.5.1.x86_64 quilt-0.65-lp152.4.2.noarch
Will deinstall virtualbox now, but wanted to keep these issues in pubic awareness.
Cheers, Pete -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Mon, Aug 31, 2020 at 5:20 PM Hans-Peter Jansen <hpj@urpla.net> wrote:
$ sc status vboxdrv.service ● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; disabled; vendor
Am Montag, 31. August 2020, 16:34:54 CEST schrieb Andrei Borzenkov: preset:
disabled)
...
$ rpm -qf /usr/lib/systemd/system/multi-user.target.wants/vbox* virtualbox-6.1.10-lp152.2.2.1.x86_64 virtualbox-6.1.10-lp152.2.2.1.x86_64
which raises the questions, why and why does systemctl display these services as vendor preset: disabled? (See above)
Because "enabled" in systemd means "links from [Install] section are present" and those links cannot be in /usr/ib, they are only ever created in /etc/or /run. presets are unrelated to links in /usr/lib - they just say whether links in /etc should be created by default or not.
There is no way to override .wanted et al links in /usr/lib. This was discussed several years ago without any practical consequences. So there is no way today packages can ship services "pre-enabled" allowing administrators to selectively disable them.
I say this is a bug in virtualbox package.
Thanks Andrei for confirmation. I somewhat expected a similar answer. In short, the only way to avoid starting vbox{drv,autostart} is uninstalling it. Larry, I'm suffering from serious time limitations at the moment, therefor I cannot submit a fix right now, but recorded https://bugzilla.opensuse.org/show_bug.cgi?id=1175973 at least. Thanks, Pete -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (2)
-
Andrei Borzenkov
-
Hans-Peter Jansen