How to install VirtualBox on a baremetal OpenMediaVault install

    • How to install VirtualBox on a baremetal OpenMediaVault install

      UPDATE: The VirtualBox installation package has been fixed. There is/was an issue with Debian's version level decision-making algorithm that is now resolved.

      This is a record of what happened and if you want to take your kernel backwards, it should work for you.

      ============================================

      About 50 fresh-installs later, I finally cracked a VirtualBox installation nut! Yes, I may not know what I'm doing, but I got'r'done. I've historically found it helpful (for myself) to document these things so that future-me can go back and do them again the next time I blow up the OS. Here's a little venture.

      Here's the TL;DR version:

      • Fresh install of OMV4, but ONLY the installation. I.e. Stop where those instructions ended. Do NOT do 1.4 million updates; do not pass GO.
      • Regress the Kernel back to 4.9.0-8-amd64
      • Install OMV-Extras in the GUI
      • At the command-line, install openmediavault
      And now, the details of what I did that succeeded and I'll spare you the trials and tribulations:
      • [X}: Acquire OpenMediaVault (OMV4 version 4.1.3 as of this writing). Burn it to a CD.
      • GUI: Install OMV4 on your computer. Make sure you only have ONE (1) hard drive attached to your motherboard during the boot. That drive is going to get completely overwritten. Yes, it's going to wipe out the disk completely. That's the way it is. Do NOT try to install on a computer with a drive(s) that has/have any data on it because you run the risk of wiping out that drive if you make a wrong selection and you'll get no opportunity to fix that once you've said "Continue" to that step (despite what the instructions say).
      • CLI: After the installation an reboot is complete (during which, it will perform some updating - that's okay), DO NOT INSTALL ANY OF THE UPDATES! Instead, update grub, to fix a Debian installation issue. It took me a long while to figure out how to not do the updates after installing OMV4, so you're really better off trusting me on this one.

      Source Code

      1. # update-grub
      2. # reboot




      Next, we're going to install the old-new kernel. I guessed at how to accomplish this using an outdated guide from 2014.
      • CLI: [Optional] Correct the distracting "noneType" error in /usr/lib/python3.5/weakref.py
      • GUI: Expand the Sources for apt to include both community and pre-release. [GUI: System->Update Management-> Settings} (I tried to past a picture, but this forum doesn't work that way and after the escapade with Photobucket, I'm not going that route ever again!)
      • CLI: Update Apt

      Source Code

      1. # apt update
      2. # apt search linux-image
      3. # apt-cache policy linux-image
      4. # apt-get install linux-image-4.9.0-8-amd64
      5. # apt-get install linux-headers-4.9.0-8-amd64


      • CLI: examine /boot/grub/grub.cfg. Count the lines that start with "menuentry … " starting at zero, until you get to the line that starts as follows and write that number down (Example: 2)




      • Source Code

        1. # more /boot/grub/grub.cfg
        2. ...
        3. menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64' --class debian
        4. ...
      • Edit the grub default file and replace the number for "GRUB_DEFAULT" with the number you wrote down from the previous step (Example: 2).
      • Update grub (again) and reboot. The system (by default) should now boot into the new-old kernel

      Source Code

      1. # nano /etc/default/grub
      2. ...
      3. GRUB_DEFAULT=2
      4. ...
      5. # update-grub
      6. # reboot


      • GUI: Change the standards for picking up updates back to stable. Exclude both community and pre-release. [GUI: System->Update Management-> Settings]
      • CLI: update apt again, then reboot. I'm not sure the reboot is needed here, but that's what I did, so I'm documenting it.


      Source Code

      1. # apt update
      2. # reboot


      • CLI: install virtualbox and reboot.

      Source Code

      1. # apt-get install openmediavault-virtualbox
      2. # reboot



      That's it! After that, the vboxmanage tool works in the CLI, the VirtualBox plugin appears in the openmediavault GUI and the PHPvirtualbox works perfectly right out of the box. My "admin" password was the same as the password for the OMV GUI. This is different from a lot of the VirtualBox documentation that says the default password will be "admin," so don't freak out when it already knows "open sesame."

      I apologize for the wayward manner in which the code segments got inserted into this posting. I couldn't figure out how to make them "work" in anything resembling an "intuitive" way and the "delete" and "backspace" keys were causing rampant formatting changes and the code segments to switch paragraphs, disappear, and all sorts of confusion for me. I'm not very good at all this GUI stuff.

      The post was edited 2 times, last by ala.frosty: There was a bug fix that renders this post moot. ().

    • I'm sorry you went through all that pain but reverting back to the 4.9 kernel is not necessary. You do need to make sure backports (button to do that in omv-extras) are enabled to get the latest virtualbox package that is compatible with the 4.18 kernel. You also don't need to enable the community and pre-release checkboxes (these are for the omv repo only). So, what I would recommend is:

      install OMV 4
      fully update
      install omv-extras
      enable backports
      make sure everything is up to date (click apt clean button in omv-extras)
      install virtualbox plugin from the web interface

      I have done this exact procedure many times.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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:

      install OMV 4

      fully update
      install omv-extras
      enable backports
      make sure everything is up to date (click apt clean button in omv-extras)
      install virtualbox plugin from the web interface

      I have done this exact procedure many times.
      I know you've done that procedure many times as I've read a lot of your truly excellent and deeply knowledgeable posts on this topic. I have also performed EXACTLY that procedure over and over and over again (varying hardware and tweaks to order of updates, etc.) with zero success with my hardware (Intel E8500 on an Asus P5Q pro board booting from an SSD on an IDE ExpressGate port). I have no idea what it is about my config that makes this procedure not work, but I absolutely promise you that it doesn't work for mine. I've read a lot of other posts about how people couldn't make that install protocol work either. So many attempts and so much #fail. Every time I went through it again, I would think "Maybe this is the secret tweak that'll make it work" but no love. I'm entirely sure that install method works on 99.9% of hardware, but it really doesn't work on mine!

      For those that can't make the "working" protocol actually work, this (finally) worked for me.

      The post was edited 6 times, last by ala.frosty ().

    • @ryecoaaron

      So, just to see the state of "things" in "that doesn't work land" I went and bought another computer today. After a fresh OMV4 install, installing OMV-extras, enabling backports and clicking apt-clean, here's what my "OMV-Extras' looks like. I'm not sure if this matters, but the "OMV-Extras" was NOT in the default list of plugins on the 4.1.3 DVD and I had to download it from omv-extras.org.

      [IMG:https://i.imgur.com/kJqrRDg.png]




      So, then I attempted to install openmediavault-VirtualBox from the command line because that's what a boss would succeed at. And here's the lack of love to which I am accustomed.

      Source Code

      1. :~# apt-get install openmediavault-virtualbox
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. Some packages could not be installed. This may mean that you have
      6. requested an impossible situation or if you are using the unstable
      7. distribution that some required packages have not yet been created
      8. or been moved out of Incoming.
      9. The following information may help to resolve the situation:
      10. The following packages have unmet dependencies:
      11. openmediavault-virtualbox : Depends: phpvirtualbox (>= 5.2-0-1) but it is not going to be installed
      12. E: Unable to correct problems, you have held broken packages.
      Display All
      The Virtual Box install used to show up in the OMV-Plugins, but hasn't recently. If you download the "OMV-Extras" for version 4, today (74k), I think you'll discover this, too.

      The post was edited 3 times, last by ala.frosty: OMV-Plugins not OMV-Extras ().

    • Source Code

      1. ~# omv-mkconf omvextras installbackports
      2. Get:1 file:/var/cache/openmediavault/archives InRelease
      3. Ign:1 file:/var/cache/openmediavault/archives InRelease
      4. Get:2 file:/var/cache/openmediavault/archives Release
      5. Ign:2 file:/var/cache/openmediavault/archives Release
      6. Get:3 file:/var/cache/openmediavault/archives Packages
      7. Ign:3 file:/var/cache/openmediavault/archives Packages
      8. Get:4 file:/var/cache/openmediavault/archives Translation-en
      9. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      10. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      11. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      12. Get:3 file:/var/cache/openmediavault/archives Packages
      13. Ign:3 file:/var/cache/openmediavault/archives Packages
      14. Get:4 file:/var/cache/openmediavault/archives Translation-en
      15. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      16. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      17. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      18. Get:3 file:/var/cache/openmediavault/archives Packages
      19. Ign:3 file:/var/cache/openmediavault/archives Packages
      20. Get:4 file:/var/cache/openmediavault/archives Translation-en
      21. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      22. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      23. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      24. Get:3 file:/var/cache/openmediavault/archives Packages
      25. Ign:3 file:/var/cache/openmediavault/archives Packages
      26. Get:4 file:/var/cache/openmediavault/archives Translation-en
      27. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      28. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      29. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      30. Get:3 file:/var/cache/openmediavault/archives Packages
      31. Ign:3 file:/var/cache/openmediavault/archives Packages
      32. Get:4 file:/var/cache/openmediavault/archives Translation-en
      33. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      34. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      35. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      36. Get:3 file:/var/cache/openmediavault/archives Packages
      37. Get:4 file:/var/cache/openmediavault/archives Translation-en
      38. Ign:4 file:/var/cache/openmediavault/archives Translation-en
      39. Get:5 file:/var/cache/openmediavault/archives Translation-en_US
      40. Ign:5 file:/var/cache/openmediavault/archives Translation-en_US
      41. Hit:6 https://openmediavault.github.io/packages arrakis InRelease
      42. Ign:7 http://ftp.us.debian.org/debian stretch InRelease
      43. Hit:8 http://ftp.us.debian.org/debian stretch-updates InRelease
      44. Hit:9 http://security.debian.org/debian-security stretch/updates InRelease
      45. Hit:10 http://ftp.us.debian.org/debian stretch Release
      46. Hit:12 http://packages.openmediavault.org/public arrakis InRelease
      47. Hit:11 http://cdn-fastly.deb.debian.org/debian stretch-backports InRelease
      48. Ign:13 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch InRelease
      49. Get:14 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch Release [4,389 B]
      50. Hit:14 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch Release
      51. Reading package lists... Done
      Display All

      Source Code

      1. # dpkg -l | grep openm
      2. ii openmediavault 4.1.13-1 all openmediavault - The open network attached storage solution
      3. ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
      4. ii openmediavault-omvextrasorg 4.1.13 all OMV-Extras.org Package Repositories for OpenMediaVault
    • Source Code

      1. # grep -ir stretch /etc/apt/*
      2. /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=stretch-backports
      3. /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=stretch-backports
      4. /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=stretch-backports
      5. /etc/apt/preferences.d/openmediavault-kernel-backports.pref:Pin: release a=stretch-backports
      6. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      7. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      8. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      9. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      10. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      11. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      12. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      13. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      14. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      15. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      16. /etc/apt/preferences.d/omv-extras-org:Pin: release a=stretch-backports
      17. /etc/apt/sources.list:# deb cdrom:[Debian GNU/Linux 9 _Stretch_ - Official Snapshot amd64 LIVE/INSTALL Binary 20180330-19:01]/ stretch contrib main non-free
      18. /etc/apt/sources.list:#deb cdrom:[Debian GNU/Linux 9 _Stretch_ - Official Snapshot amd64 LIVE/INSTALL Binary 20180330-19:01]/ stretch contrib main non-free
      19. /etc/apt/sources.list:deb http://ftp.us.debian.org/debian/ stretch main
      20. /etc/apt/sources.list:deb-src http://ftp.us.debian.org/debian/ stretch main
      21. /etc/apt/sources.list:deb http://security.debian.org/debian-security stretch/updates main contrib non-free
      22. /etc/apt/sources.list:deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free
      23. /etc/apt/sources.list:# stretch-updates, previously known as 'volatile'
      24. /etc/apt/sources.list:deb http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
      25. /etc/apt/sources.list:deb-src http://ftp.us.debian.org/debian/ stretch-updates main contrib non-free
      26. /etc/apt/sources.list.d/omv-extras-org.list:deb https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch main
      27. /etc/apt/sources.list.d/openmediavault-kernel-backports.list:deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
      28. Binary file /etc/apt/trusted.gpg.d/debian-archive-stretch-security-automatic.gpg matches
      29. Binary file /etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg matches
      30. Binary file /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg matches
      Display All
    • ala.frosty wrote:

      I'm not sure if this matters, but the "OMV-Extras" was NOT in the default list of plugins on the 4.1.3 DVD and I had to download it from omv-extras.org.
      That is correct. omv-extras has never been included with any official OMV release. It is on the OMV arm images because we build those.

      ala.frosty wrote:

      Both of the "Backports" "traffic lights" are lit up on the dropdown.
      They aren't lights. Just icons that I picked to differentiate between them. They don't indicate status. Sorry, my creativity is not good :)


      ala.frosty wrote:

      The Virtual Box install used to show up in the OMV-Extras, but hasn't recently. If you download the "OMV-Extras" for version 4, today (74k), I think you'll discover this, too
      If you ever want to know if a plugin is in the repo, look here - bintray.com/openmediavault-plugin-developers/arrakis. The virtualbox plugin has never been out of the repo. Now that I think you have the omv-extras bintray repo added, what is the output of: apt-cache policy openmediavault-virtualbox
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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!
    • For this (attempted) build, I did everything from scratch: downloading OMV4.1, burning a new DVD, downloading OMV-extras and I didn't do anything other than "update-grub" before the updates and probably more reboots than needed. Other than that, I've stuck rigidly to the script.

      Source Code

      1. # apt-cache policy openmediavault-virtualbox
      2. openmediavault-virtualbox:
      3. Installed: (none)
      4. Candidate: 4.1
      5. Version table:
      6. 4.1 500
      7. 500 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch/main amd64 Packages
      8. 4.0 500
      9. 500 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch/main amd64 Packages

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

    • That looks perfect. Can you post the output of: apt-cache policy virtualbox now
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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!
    • Having done this install a whole bunch, I've seen that "httpredir" in the sources with all of the installs I've done. I always pick the "debian.org" selection at the top of the mirrors list.

      Source Code

      1. # apt-cache policy virtualbox
      2. virtualbox:
      3. Installed: (none)
      4. Candidate: 5.2.18-dfsg-2~bpo9+1
      5. Version table:
      6. 5.2.18-dfsg-2~bpo9+1 500
      7. 100 http://httpredir.debian.org/debian stretch-backports/contrib amd64 Packages

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

    • ala.frosty wrote:

      I've seen that "httpredir" in the sources with all of the installs I've done. I always pick the "debian.org" selection at the top of the mirrors list.
      That is fine. It will just try to select the mirror closest to you.

      Your output of apt-cache looks good. You shouldn't have any problems installing the plugin based on the output of those two commands.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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!
    • See below. The installation fails due to "you have held broken packages." The only way I've successfully gotten around this is by reverting to the older kernel. And I have tried a LOT of things to get through it. I probably should've documented it all, but at the outset, I haven't had issues like this with OMV before, so I thought I could just resolve the dependencies and power-through. I was wrong!

      Source Code

      1. # apt-get install openmediavault-virtualbox
      2. Reading package lists... Done
      3. Building dependency tree
      4. Reading state information... Done
      5. Some packages could not be installed. This may mean that you have
      6. requested an impossible situation or if you are using the unstable
      7. distribution that some required packages have not yet been created
      8. or been moved out of Incoming.
      9. The following information may help to resolve the situation:
      10. The following packages have unmet dependencies:
      11. openmediavault-virtualbox : Depends: phpvirtualbox (>= 5.2-0-1) but it is not going to be installed
      12. E: Unable to correct problems, you have held broken packages.
      Display All



      Source Code

      1. # apt-cache policy phpvirtualbox
      2. phpvirtualbox:
      3. Installed: (none)
      4. Candidate: 5.2-1
      5. Version table:
      6. 5.2-1 500
      7. 500 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch/main amd64 Packages
      8. 5.2-0 500
      9. 500 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch/main amd64 Packages
      10. 5.0-5-2 500
      11. 500 https://dl.bintray.com/openmediavault-plugin-developers/arrakis stretch/main amd64 Packages
      Display All
    • That is my fault. I didn't realize the Debian package system would think 5.2-0-1 is greater than 5.2-1. 4.1.1 is in the repo to fix this now.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      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!
    • I tried a fresh install again. On the first go 'round the whole update process was broken and tanked the OS pretty completely. That might've been a user error or something because when I gave up and tried another fresh install, about an hour later, the install worked fine all the way through the VirtualBox install.

      ryecoaaron wrote:

      4.1.1 is in the repo to fix this now.
      I think it's fair to say that this is properly fixed and appears to work, including the PhpVirtualBox login. Thank you very much for sticking with me, here, @ryecoaaron! Much appreciated.