phpvirtualbox / phpvirtualbox

A web interface to manage and access Virtualbox machines.
Other
1.08k stars 270 forks source link

[request] Search and use Version of VBox #250

Open blackcrack opened 3 years ago

blackcrack commented 3 years ago

Hi,

there is the value variable in the WinNT System VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\ and in Linux is the path so far static to Virtualbox: /usr/bin/VirtualBox

so, could be test if variable "VBOX_MSI_INSTALL_PATH" or not, then check if file "/usr/bin/VirtualBox" exist

then could test the version, and then add it to the PHP-VirtualBox. to make it able for preconfiguring and easy working without wrong version.

the PHP-VirtualBox should easy working, without extra php-file preconfiguration by User.. if i am not wrong.. have it tested before a couples years to make a OMV testserver.. but the system have at end not really work well.. (the mouse bite in the self tail) but now I intend to make a Reactos test VBox server for "Program Testers for Reactos" channel and want invite peoples for it as members for a Reactos instance to have a testing-possible in team for making reactos better.. therefore should PHP-VirtualBox easy work, no matter with version of VirtualBox installed..

best regards Blacky

h6w commented 3 years ago

phpVirtualbox is currently built for a particular version of Virtualbox. This is because the API changes with each version and we don't currently have the manpower to support previous versions as it would complicate the codebase. Relying on a particular version is really a job for a package manager anyway.

blackcrack commented 3 years ago

hmmm.. and if you make PHPVBox so far compatible to works in anycase, make it possible to browse the different exefile (so, usable for WinNT Server and also for Linux) where to use in the configuration for The PHPVBox admin and make it possible in the configuration to use different versions in the PHPVBox ad also a configuration a textbox or pulldown Textbox with the versions like 5.0,5.1, 5.2,6.0, 6.1, 6.2, 6.3 and a textfile where use it and set this versions in array or maybe folders with textfiles where be the configurations of the versions.. so

winnt : ./5.1/winnt-config.ini linux : /5.1/linux-config.ini or more specially: fedora : /5.1/fedora-$version$-config.ini ubuntu: /5.1/ubuntu-$version$-config.ini

./$VBOX_VERSION$/$distro$-$distroversion$-config.ini and ./$VBOX_VERSION$/$vbox_groundconfig$-$PHPversion$-config.ini

therewith be more configurations file's (and more possibility) and other could it supporting with patches.. or maybe vboxmembers could also make patches for /6.0/ or /6.1/ with configurations and let read in the folders in array and there gives a php ini-reader in php, this could also add PHPVBox module therewith could it be possible for patches from Github members and update it.. i bet if you make it possible make many distributions also rpm-packages.. and the PHPVirtualbox will more updated from Githubmembers

best regards Blacky

h6w commented 3 years ago

We can't. There is an API file we take from the SDK and the features change from version to version. It would take a very long time to test each version for each prior version.

Like I said, this is a package management problem, not an upstream development problem.

trasherdk commented 3 years ago

Tagging and branching could have solved the version problem.

Also. Assuming a static install path on Linux will fail.

cat /etc/vbox/vbox.cfg

# VirtualBox installation directory
INSTALL_DIR='/opt/VirtualBox'
# VirtualBox version
INSTALL_VER='6.0.18'
INSTALL_REV='136238'
# Build type and user name for logging purposes
BUILD_TYPE='release'
USERNAME='username'