Kernel Update breaks VirtualBox Plugin

    • Kernel Update breaks VirtualBox Plugin

      Hello,

      after installing some (all pending) updates and rebooting, Virtual Box Plugin is broken. I get this error message when logging into omv gui.

      Could not connect to host ([url]http://127.0.0.1:18083/[/url])

      Source Code: Could not connect to host (http://127.0.0.1:18083/)

      1. Fehler #0:
      2. Exception: Could not connect to host (http://127.0.0.1:18083/) in /usr/share/phpvirtualbox/endpoints/lib/vboxconnector.php:220
      3. Stack trace:
      4. #0 /usr/share/openmediavault/engined/rpc/virtualbox.inc(136): vboxconnector->connect()
      5. #1 [internal function]: OMV\Engined\Rpc\VirtualBox->getMachines(Array, Array)
      6. #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      7. #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getMachines', Array, Array)
      8. #4 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('VirtualBox', 'getMachines', Array, Array, 1)
      9. #5 {main}


      Starting PHPVirtualBox gives me:

      An error occurred communicating with your vboxwebsrv. No more requests will be sent by phpVirtualBox until the error is corrected and this page is refreshed. The details of this connection error should be displayed in a subsequent dialog box.

      followed by:

      Source Code: Could not connect to host (http://127.0.0.1:18083/)

      1. Exception Object
      2. (
      3. [message:protected] => Could not connect to host (http://127.0.0.1:18083/)
      4. [string:Exception:private] =>
      5. [code:protected] => 64
      6. [file:protected] => /usr/share/phpvirtualbox/endpoints/lib/vboxconnector.php
      7. [line:protected] => 220
      8. [trace:Exception:private] => Array
      9. (
      10. [0] => Array
      11. (
      12. [file] => /usr/share/phpvirtualbox/endpoints/lib/vboxconnector.php
      13. [line] => 3147
      14. [function] => connect
      15. [class] => vboxconnector
      16. [type] => ->
      17. [args] => Array
      18. (
      19. )
      20. )
      21. [1] => Array
      22. (
      23. [file] => /usr/share/phpvirtualbox/endpoints/lib/vboxconnector.php
      24. [line] => 951
      25. [function] => remote_vboxGetGuestOSTypes
      26. [class] => vboxconnector
      27. [type] => ->
      28. [args] => Array
      29. (
      30. [0] =>
      31. )
      32. )
      33. [2] => Array
      34. (
      35. [file] => /usr/share/phpvirtualbox/endpoints/api.php
      36. [line] => 316
      37. [function] => __call
      38. [class] => vboxconnector
      39. [type] => ->
      40. [args] => Array
      41. (
      42. [0] => vboxGetGuestOSTypes
      43. [1] => Array
      44. (
      45. [0] =>
      46. [1] => Array
      47. (
      48. [0] => Array
      49. (
      50. [data] => Array
      51. (
      52. [responseData] => Array
      53. (
      54. )
      55. )
      56. [errors] => Array
      57. (
      58. )
      59. [persist] => Array
      60. (
      61. )
      62. [messages] => Array
      63. (
      64. )
      65. )
      66. )
      67. )
      68. )
      69. )
      70. )
      71. [previous:Exception:private] =>
      72. )
      73. Location:http://127.0.0.1:18083/
      Display All


      A new kernel has been installed recently: Debian GNU/Linux, with Linux 4.16.0-0.bpo.2-amd64.

      Switching back to Debian GNU/Linux, with Linux 4.16.0-0.bpo.1-amd64 in OMV-Extras fixes the problem for now.

      Would you please tell me what to do to fix that (now and in future)? And is there a way to automate this fixing for future kernel updates? (at least for minor updates like this one)

      Thanks in advance.

      The post was edited 2 times, last by Mr Smile ().

    • Mr Smile wrote:

      Would you please tell me what to do to fix that (now and in future)? And is there a way to automate this fixing for future kernel updates? (at least for minor updates like this one)
      You probably don't have the kernel headers installed for the new kernel. Not sure why. The plugin depends on linux-image-amd64 which should automatically update when you update the kernel. My systems did.

      Mr Smile wrote:

      Would you please tell me what to do to fix that (now and in future)?
      I think this has been discussed many, many times. I have tried to make the plugins do the right thing by depending on the meta package for the kernel and headers. The virtualbox-dkms package is supposed to be triggered on kernel upgrades to compile a new module. We didn't create these packages . If they aren't working, I really don't know what to tell you. There is *very* little the plugin can do about it. All I can suggest is test on a different system before upgrading on your main system.

      Mr Smile wrote:

      (at least for minor updates like this one)
      When Debian creates a different package for a kernel (even though they are both 4.16), it isn't really a minor update. Minor updates will be the same package name.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hmm. Didn't touch anything kernel related since installation of omv. I uninstalled VirtualBox Plugin, switched to Debian GNU/Linux, with Linux 4.16.0-0.bpo.2-amd64 again and after a reboot I reinstalled VirtualBox. And now the error is gone. Any idea why virtualbox-dkms was not triggered during kernel upgrade? This is really a very standard omv installation. ?(
    • Mr Smile wrote:

      And now the error is gone. Any idea why virtualbox-dkms was not triggered during kernel upgrade? This is really a very standard omv installation
      Unfortunately, I have no idea.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Unfortunately this happened again. I don't know what (days before installed) update broke it this time but after a restart I had the same problem. I had no ssh access when it happened. So I decided to uninstall and install Virtualbox-Plugin again and this solved the issue. So it seems that virtualbox-dkms was not triggered again after kernel update.

      Could you please help me to identify and fix the reason for that? This problem is very annoying. Thanks. :)
    • What kernel update did you install? Unfortunately, this is not a package we maintain. Uninstalling the plugin only worked because it uninstalled virtualbox and re-installed. dpkg-reconfigure virtualbox-dkms should work. I had added a button to the plugin to do this step but it didn't seem necessary in OMV 4.x. Maybe it needs to come back. Otherwise, I don't have a solution if dkms isn't doing its job.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hmmm. I actually don't know. I'm not even sure anymore that it was a kernel update that broke vbox. The installed Kernel was and is 4.16.0-0.bpo.2-amd64. 8|

      So it seems that some other past update has been responsible for this failure that became apparent after rebooting omv. I'll keep an eye on it and report back if/when it happens again.
    • The 4.17 kernel has been released. Please don't install it or new linux-header packages because virtualbox 4.2.10 will not compile its module on the 4.17 kernel.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!

      The post was edited 1 time, last by ryecoaaron ().

    • Yep, discovered that AFTER upgrading!

      I have this installed:

      Source Code

      1. root@openmediavault:/# sudo ls /boot | grep vmlinuz | cut -d'-' -f2,3
      2. 4.16.0-0.bpo.2
      3. 4.17.0-0.bpo.1
      4. root@openmediavault:/#


      Specifically these:

      Source Code

      1. root@openmediavault:/# dpkg -l | grep linux | awk '{print$2}'
      2. console-setup-linux
      3. firmware-linux
      4. firmware-linux-free
      5. firmware-linux-nonfree
      6. libselinux1:amd64
      7. linux-base
      8. linux-compiler-gcc-6-x86
      9. linux-headers-4.16.0-0.bpo.2-amd64
      10. linux-headers-4.16.0-0.bpo.2-common
      11. linux-headers-4.17.0-0.bpo.1-amd64
      12. linux-headers-4.17.0-0.bpo.1-common
      13. linux-headers-amd64
      14. linux-image-4.16.0-0.bpo.2-amd64
      15. linux-image-4.17.0-0.bpo.1-amd64
      16. linux-image-amd64
      17. linux-kbuild-4.16
      18. linux-kbuild-4.17
      19. linux-libc-dev:amd64
      20. util-linux
      21. root@openmediavault:/#
      Display All
    • From the error log (only interesting parts):

      Source Code

      1. DKMS make.log for virtualbox-5.2.10 for kernel 4.17.0-0.bpo.1-amd64 (x86_64)
      2. Fri Aug 3 18:06:51 CDT 2018
      3. make: Entering directory '/usr/src/linux-headers-4.17.0-0.bpo.1-amd64'
      4. CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/SUPDrvTracer.o
      5. /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/.tmp_SUPDrvTracer.o: warning: objtool: .text+0x7: indirect jump found in RETPOLINE build
      6. CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/SUPLibAll.o
      7. CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/r0drv/linux/process-r0drv-linux.o
      8. /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/r0drv/linux/.tmp_memuserkernel-r0drv-linux.o: warning: objtool: .fixup: unexpected end of section
      9. CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxdrv/r0drv/linux/rtStrFormatKernelAddress-r0drv-linux.o
      10. CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/SUPR0IdcClient-linux.o
      11. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c: In function ‘vboxPciLinuxDevDetachHostDriver’:
      12. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c:92:40: error: implicit declaration of function ‘pci_get_bus_and_slot’ [-Werror=implicit-function-declaration]
      13. # define PCI_DEV_GET_SLOT(bus, devfn) pci_get_bus_and_slot(bus, devfn)
      14. ^
      15. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c:397:15: note: in expansion of macro ‘PCI_DEV_GET_SLOT’
      16. pPciDev = PCI_DEV_GET_SLOT(uBus, uDevFn);
      17. ^~~~~~~~~~~~~~~~
      18. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c:397:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      19. pPciDev = PCI_DEV_GET_SLOT(uBus, uDevFn);
      20. ^
      21. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c: In function ‘vboxPciOsDevInit’:
      22. /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c:648:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      23. pPciDev = PCI_DEV_GET_SLOT((pIns->HostPciAddress) >> 8,
      24. ^
      25. cc1: some warnings being treated as errors
      26. /usr/src/linux-headers-4.17.0-0.bpo.1-common/scripts/Makefile.build:317: recipe for target '/var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.o' failed
      27. make[4]: *** [/var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.o] Error 1
      28. /usr/src/linux-headers-4.17.0-0.bpo.1-common/scripts/Makefile.build:564: recipe for target '/var/lib/dkms/virtualbox/5.2.10/build/vboxpci' failed
      29. make[3]: *** [/var/lib/dkms/virtualbox/5.2.10/build/vboxpci] Error 2
      30. /usr/src/linux-headers-4.17.0-0.bpo.1-common/Makefile:1585: recipe for target '_module_/var/lib/dkms/virtualbox/5.2.10/build' failed
      31. make[2]: *** [_module_/var/lib/dkms/virtualbox/5.2.10/build] Error 2
      32. Makefile:146: recipe for target 'sub-make' failed
      33. make[1]: *** [sub-make] Error 2
      34. Makefile:8: recipe for target 'all' failed
      35. make: *** [all] Error 2
      36. make: Leaving directory '/usr/src/linux-headers-4.17.0-0.bpo.1-amd64'
      Display All
    • odinb wrote:

      Any idea on whats causing this, and when it will be fixed?
      The virtualbox kernel driver needs to be updated to support the newer kernel. It can be fixed by using the proxmox kernel or waiting for virtualbox 5.2.12+ to be in the debian repos or not upgrading or just keep using the 4.16 kernel for now. I will see if the 5.2.16 package from Buster builds on Stretch.

      The virtualbox 5.2.16 package is in the stretch-backports repo now. You just need to update your system.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!

      The post was edited 1 time, last by ryecoaaron ().

    • ryecoaaron wrote:

      odinb wrote:

      Any idea on whats causing this, and when it will be fixed?
      The virtualbox kernel driver needs to be updated to support the newer kernel. It can be fixed by using the proxmox kernel or waiting for virtualbox 5.2.12+ to be in the debian repos or not upgrading or just keep using the 4.16 kernel for now. I will see if the 5.2.16 package from Buster builds on Stretch.
      The virtualbox 5.2.16 package is in the stretch-backports repo now. You just need to update your system.

      Hallo sir

      My vm is running very bad (Windows10 keeps locking and frezzing // In rdp VNC is running fine)
      I have installed the new kernel 4.17 and updated virtualbox to 5.2.16 BUT still having issues..


      I also keep getting this: See attachments

      And the log: See attachments
      Images
      • 2018-08-07 12_21_22-phpVirtualBox - VirtualBox Web Console – Google Chrome.png

        29.66 kB, 905×294, viewed 12 times
      Files
      • Vbox.txt

        (67.84 kB, downloaded 11 times, last: )

      The post was edited 1 time, last by kekec888 ().

    • kekec888 wrote:

      My vm is running very bad (Windows10 keeps locking and frezzing // In rdp VNC is running fine)
      I have installed the new kernel 4.17 and updated virtualbox to 5.2.16 BUT still having issues..
      I don't use virtualbox and even when I did, I didn't run Windows VMs. Did you install the latest guest tools/drivers? This is one reason to not always run the latest version of virtualbox I guess.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      kekec888 wrote:

      My vm is running very bad (Windows10 keeps locking and frezzing // In rdp VNC is running fine)
      I have installed the new kernel 4.17 and updated virtualbox to 5.2.16 BUT still having issues..
      I don't use virtualbox and even when I did, I didn't run Windows VMs. Did you install the latest guest tools/drivers? This is one reason to not always run the latest version of virtualbox I guess.
      Hmm yeah i have updated the guest additions also...

      Is there anyway to roll back ?
      I can uninstall virtualbox but when i install it from plugins its still the new version...
    • kekec888 wrote:

      Is there anyway to roll back ?
      Sure. The other kernel is probably still installed (select it from the kernel tab in omv-extras). I would try the older kernel before changing virtualbox.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      odinb wrote:

      Any idea on whats causing this, and when it will be fixed?
      The virtualbox kernel driver needs to be updated to support the newer kernel. It can be fixed by using the proxmox kernel or waiting for virtualbox 5.2.12+ to be in the debian repos or not upgrading or just keep using the 4.16 kernel for now. I will see if the 5.2.16 package from Buster builds on Stretch.
      The virtualbox 5.2.16 package is in the stretch-backports repo now. You just need to update your system.
      Thanks a lot for this advice. :thumbup: I waited patiently and today 4.17.0-0.bpo.1-amd64 update went through without problems. :saint:

      Don't have any Windows VMs. The Linux ones run as fast a expected.
    • Mr Smile wrote:

      (Kernel-)Updates seem to be "problematic" to users of vbox-plugin in general. Should we have a pinned status thread for vbox related stuff?
      Kernel updates can be problematic for virtualbox, zfs, and other compiled kernel modules. I guess I could pin a thread for it if someone else maintains it. But, most people don't look at them.
      omv 4.1.9 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!