Page 1 of 1
Working via admin privileges
Posted: 25. Mar 2017, 23:23
by mcgregor
Hi. I trying to work with the VBoxManage.exe from php execution (like exec). Since my apache (xampp) working as service it starting vboxmanage.exe with admin privileges. So, it can found no one machine:
VBOX_E_OBJECT_NOT_FOUND (0x80bb0001). I have googled that vbox looses path to VirtualBox.xml because it have config for nothing but default user. How I can fix it on my 4.3.4? Maybe I can set a global var or send as cmd argument to vboxmanage.exe? Thx.
Re: Working via admin privileges
Posted: 26. Mar 2017, 14:22
by noteirak
Moving to "Using VirtualBox"
Re: Working via admin privileges
Posted: 26. Mar 2017, 14:30
by noteirak
VirtualBox config, and therefore list of registered machines, is saved on a per-user basis.
If you registered your VMs with another user, it's normal you won't see them, and you'll need to register them under the user actually using vboxmanage.
Section 10.1 of the User manual gives a detailed explanation of files location and the environment variables to change those.
Beware: it is usually a bad idea to use another user config, especially when running as admin or equivalent, as this will most likely cause permissions issues later on.
I would strongly recommend doing this the right way:
- Do not use an administrator account. This can solve itself easily with the following point
- Calling vboxmanage from PHP is also the wrong approach usually since you can use the PHP Bindings of the Java API. phpVirtualBox is a well-known community project which leverage that API.
- Use VirtualBox 5.1 or 5.0 - 4.x are no longer supported, which means no help from here either.
Re: Working via admin privileges
Posted: 26. Mar 2017, 18:14
by mcgregor
noteirak wrote:[*]Use VirtualBox 5.1 or 5.0 - 4.x are no longer supported, which means no help from here either.[/list]
I'd glad to use it, but VBox 5.x sometimes corrupting my screenshots and I can't return it back then.
Now I fixed the problem by changing account for launching my apache service.
Re: Working via admin privileges
Posted: 26. Mar 2017, 18:58
by noteirak
noteirak wrote:Section 10.1 of the User manual gives a detailed explanation of files location and the environment variables to change those.
Thx. Now I can change the "VirtualBox VMs" directory but how do it with VirtualBox.xml? I wanna do common VBox folders for all users.
I never talked about the VM directory, and that value is stored within VirtualBox.xml
Read the full section as it tells how which environment variables to use to change the location of user config (including VirtualBox.xml).