Running a VM as a user after configuring as an admin

Discussions related to using VirtualBox on Windows hosts.

Running a VM as a user after configuring as an admin

Postby supercrazymark » 11. Jul 2013, 14:07

Hello,
I am working on getting a Virtualbox solution running at the school I am the Network Manager at.

All has gone really well and my setup is as follows:

- Virtualbox is installed locally on each computer
- The virtualbox files (.vbox etc) are located in C:\Virtualbox on each computer
- Everyone has full control of C:\Virtualbox and, for good measure, C:\Program Files\Oracle\VirtualBox

After configuring (register & test) a VM while logged in as an admin I am able to log off (or reboot) and log in as any of my other admin accounts and run Virtualbox with no issues.

However, if I log in as a student (as standard user) when I click to open Virtualbox nothing happens. No errors, nothing!

Is there any other locations that I should be allowing a standard user access to?

I am so close! When i open as an admin my Virtual image is perfect... this is the last hurdle :)
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 11. Jul 2013, 14:26

...after a bit more research I have found the log file. Here is a sample logfile:

Code: Select all   Expand viewCollapse view
VirtualBox COM Server 4.2.16 r86992 win.x86 (Jul  4 2013 16:33:12) release log
00:00:00.000000 main     Log opened 2013-07-11T10:27:51.335592800Z
00:00:00.000000 main     OS Product: Windows 7
00:00:00.000000 main     OS Release: 6.1.7601
00:00:00.000000 main     OS Service Pack: 1
00:00:00.093000 main     DMI Product Name: RM EXPERT 3040
00:00:00.156000 main     DMI Product Version: 1.0
00:00:00.156000 main     Host RAM: 3031MB total, 1594MB available
00:00:00.156000 main     Executable: C:\Program Files\Oracle\VirtualBox\VBoxSVC.exe
00:00:00.156000 main     Process ID: 2492
00:00:00.156000 main     Package type: WINDOWS_32BITS_GENERIC
00:00:00.515000          usbLibDevStrDrEntryGet: DeviceIoControl 1 fail winEr (31)
00:00:00.968000          VDInit finished
00:00:00.984000          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={3b2f08eb-b810-4715-bee0-bb06b9880ad2} aComponent={VirtualBox} aText={Could not find a registered machine named 'VirtualComputingVM'}, preserve=false


Is it possible to auto register the VM when the user opens it?

Currently my bat file to open the VM looks like this:

Code: Select all   Expand viewCollapse view
cd "C:\Program Files\Oracle\VirtualBox\"

vboxmanage setproperty machinefolder "C:\VirtualBox"

pause

VBoxManage registervm "C:\VirtualBox\VirtualComputingVM.vbox"

pause

VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar

pause

VBoxManage setextradata "VirtualComputingVM" GUI/RestrictedCloseActions SaveState,Restore

pause

VBoxManage setextradata "VirtualComputingVM" GUI/Input/MachineShortcuts "FullscreenMode=None,SeamlessMode=None,SettingsDialog=None,TakeSnapshot=None,ScaleMode=None"

pause

VBoxManage modifyvm "VirtualComputingVM" --biosbootmenu disabled

pause

VBoxManage modifyvm "VirtualComputingVM" --memory "1024"

pause

VBoxManage modifyvm "VirtualComputingVM" --bioslogoimagepath "C:\Program Files\Oracle\VirtualBox\SWGSSplashscreen.bmp"

pause

VBoxManage startvm "VirtualComputingVM"

pause


(pauses in there so I can see whats happening).

Am I doing it right or is there a different way of doing this?

Any help/advice is very much appreciated...

Mark
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 11. Jul 2013, 14:36

Just incase anyone is reading this thread, I may have solved it (but not tested properly yet).

I copied the VirtualBox.xml file from the .Virtualbox directory of the admin account and copied it into the user account, logged on as the user and it worked.

Am looking into testing this further....
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby noteirak » 11. Jul 2013, 14:41

Looks like a permission issue actually - each user should be able to create the .Virtualbox folder in its own home folder, you shouldn't require admin rights.
I guess you locked down the profiles a bit too much on this one :)
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5197
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 11. Jul 2013, 16:19

noteirak wrote:Looks like a permission issue actually - each user should be able to create the .Virtualbox folder in its own home folder, you shouldn't require admin rights.
I guess you locked down the profiles a bit too much on this one :)


I think you are right :) Being a school we have to have student stations locked down as much as possible...

Copying the xml file from a share (sourced from my admin login) into the correct user loaction works (as I have written an exe that does all sort of houskeeping when the VB is started).

Interestingly, Virtualbox only starts one in every two to three clicks and I can't work out why lol...
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby noteirak » 11. Jul 2013, 23:21

supercrazymark wrote:Interestingly, Virtualbox only starts one in every two to three clicks and I can't work out why lol...

Most likely more permission issues.
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5197
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 12. Jul 2013, 08:42

noteirak wrote:
supercrazymark wrote:Interestingly, Virtualbox only starts one in every two to three clicks and I can't work out why lol...

Most likely more permission issues.


Thats what I thought, but if it was permission issues surely it would either work all the time or not work all the time? Today I am going to try and relax the security on the %user%\.Virtualbox folder and see if that makes a difference.... I'll update this post with my results :)
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby mpack » 12. Jul 2013, 12:14

Running the installer with admin rights is ok (in fact necessary I believe). Installing while logged in as user "Admin" is not so ok, unless that is how you'll always be wanting to use the VM.
mpack
Site Moderator
 
Posts: 32679
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 12. Jul 2013, 12:18

mpack wrote:Running the installer with admin rights is ok (in fact necessary I believe). Installing while logged in as user "Admin" is not so ok, unless that is how you'll always be wanting to use the VM.


Here is what I currently do:

1 - Log into the computer as an administrator
2 - Install VB
3 - Configure VB
4 - log off

Then, when I log in as a user I can run a bat file that runs various vbmanage commands then starts a vm. It's this stage that only seems to run once every 2-3 attempts...
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit

Re: Running a VM as a user after configuring as an admin

Postby noteirak » 12. Jul 2013, 13:29

supercrazymark wrote:Then, when I log in as a user I can run a bat file that runs various vbmanage commands then starts a vm. It's this stage that only seems to run once every 2-3 attempts...

What happens if you actually run the commands yourselves?
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5197
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: Running a VM as a user after configuring as an admin

Postby supercrazymark » 16. Jul 2013, 09:11

I will run some extensive testing next week (when the school is on summer holiday) as this week is a very busy week. My goal is to get everything working by September 2nd so wil be "on it" a lot more over the coming weeks :)
supercrazymark
 
Posts: 31
Joined: 14. May 2013, 11:42
Location: Salisbury
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot], vidatuve and 39 guests