Update virtualbox

    • OMV 2.x
    • on OMV 2.x, it uses the version of virtualbox in the omv-extras repos. Read this - Virtual Box error
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!
    • I used your script to install the newer virtualbox version.
      Now i get:

      "An unknown PHP error occurred. This is most likely a syntax error in config.php in phpVirtualBox's folder. The most common errors are an unclosed quote or a missing semicolon in a configuration item that has been entered (e.g. location, username, or password)."

      when trying to access phpvirtualbox

      Doing

      apt-get purge virtualbox-4.3 openmediavault-virtualbox phpvirtualbox

      and rerunning the script did not help

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

    • PHP Source Code

      1. <?php
      2. /**
      3. * Copyright (C) 2010-2012 Ian Moore <imooreyahoo@gmail.com>
      4. * Copyright (C) 2013-2015 OpenMediaVault Plugin Developers
      5. *
      6. * This file is free software: you can redistribute it and/or modify
      7. * it under the terms of the GNU General Public License as published by
      8. * the Free Software Foundation, either version 3 of the License, or
      9. * any later version.
      10. *
      11. * This file is distributed in the hope that it will be useful,
      12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
      13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      14. * GNU General Public License for more details.
      15. *
      16. * You should have received a copy of the GNU General Public License
      17. * along with this file. If not, see <http://www.gnu.org/licenses/>.
      18. */
      19. use Exception;
      20. use SplFileInfo as FileInfo;
      21. class phpVBoxConfig
      22. {
      23. // Static config items.
      24. public $location = "http://127.0.0.1:18083/";
      25. public $language = "en";
      26. public $startStopConfig = true;
      27. public $username = "";
      28. public $password = "";
      29. public $enableAdvancedConfig = false;
      30. // Automatic config items.
      31. public function __construct()
      32. {
      33. $settings = $this->getSettings();
      34. if (!$settings->enable) {
      35. die("alert('phpVirtualBox disabled by OpenMediaVault configuration.');");
      36. }
      37. $this->enableAdvancedConfig = $settings->enable_advanced;
      38. $this->username = $this->getVboxUserUsername();
      39. $this->password = $this->getVboxUserPassword();
      40. }
      41. private function getSettings()
      42. {
      43. // Normally we should use OMVRpc::exec for this but since pulling
      44. // it in caused issues in OMV we just call the RPC from the shell.
      45. $data = shell_exec("/usr/sbin/omv-rpc VirtualBox getSettings");
      46. if (!$data) {
      47. throw new Exception("Failed to get OMV VirtualBox settings.");
      48. }
      49. return json_decode($data);
      50. }
      51. private function getVboxUserUsername()
      52. {
      53. return "vbox";
      54. }
      55. private function getVboxUserPassword()
      56. {
      57. $file = new FileInfo("/etc/default/openmediavault-virtualbox");
      58. if (!$file->isReadable()) {
      59. throw new Exception("Can't read /etc/defaults/openmediavault-virtualbox");
      60. }
      61. $file = $file->openFile();
      62. $password = $file->fgets();
      63. $file = null;
      64. // Trim the password variable since it may contain a newline char.
      65. return trim($password);
      66. }
      67. }
      Display All
    • That looks right. Did you try clearing your browser cache and/or use a different browser?
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

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