Installing and using VirtualBox without Admin Privs?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
rk_virtualbox
Posts: 4
Joined: 26. Jan 2023, 14:58

Installing and using VirtualBox without Admin Privs?

Post by rk_virtualbox »

We are providing VirtualBox to our teams, but they have Macbooks with NO admin permissions.
Can someone help advise us please...
(1) We can package up VirtualBox on our 'app store' which will allow it to be installed without Admin permissions. i have tried that on a test Macbook (without admin permissions), and that successfully installs.
(2) However, can one create and use a VM (say a LINUX guess VM as an example) successfully, whilst having NO admin permissions on the host box?
(a) I briefly tried this, and I think the workflow tried to change a setting or other that required an admin password. I skipped continue, but it didn;t fill me with confidence that my VM creation would then go on to be successful?
(3) Do you know in the above scenario, if users can use VirtualBox successfully to create and run VMs without admin permissions?
(a) Are there any bits which WON't work, or will ALL of it not work?
(4) Are there any suggestions that we can make this work? For exmaple, if we put the 'extension pack' on our App store also? I'm not sure of the extension pack will help though.

Thanks In Advance
multiOS
Volunteer
Posts: 799
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Installing and using VirtualBox without Admin Privs?

Post by multiOS »

A few questions that 'we' need to ask to try to provide you with an informed answer:

- Are the MacBooks in use Intel-based or of the newer M1/M2-based variety?

- Which version(s) of macOS are used on the MacBooks?

- What version of VirtualBox are you considering using? The versions currently supported by Oracle (i.e. receiving updates) are 6.1.xx and 7.0.x; and the installation process differs between the two so the possible issues can be different.
rk_virtualbox
Posts: 4
Joined: 26. Jan 2023, 14:58

Re: Installing and using VirtualBox without Admin Privs?

Post by rk_virtualbox »

Thanks for the swift reply.
Yes, sure - I can answe these as follows:
- The Macbooks are Intel based macbooks (but any new purchases for new starters may well be M1 based chipset)
- The Macbooks are typically using MacOS Monterey version
- We are happy to use which ever Virtual Box version that works best in this scenario. (In other words installs and is able to run VMs without admin access password requests)
(PS: Not sure if it even available , but if it helps we can use homebrew to install to. In case, you have any formulae or other bits available via Homebrew. Homebrew, as you know does not require admin access)

Thanks
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing and using VirtualBox without Admin Privs?

Post by mpack »

rk_virtualbox wrote: (but any new purchases for new starters may well be M1 based chipset)
They had better not be, if you want to run Intel OS VMs. But at least it would solve your admin rights problem, or at least make them moot...
rk_virtualbox
Posts: 4
Joined: 26. Jan 2023, 14:58

Re: Installing and using VirtualBox without Admin Privs?

Post by rk_virtualbox »

Yes, we are happy to stick to Intel based Macbooks. Lets solve one problem at a time etc. This is the most pressing one. Just wondering if we can use VirtualBox and create and use VMs with no admin password required?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Installing and using VirtualBox without Admin Privs?

Post by mpack »

rk_virtualbox wrote:Just wondering if we can use VirtualBox and create and use VMs with no admin password required?
I'm not a Mac user, but everywhere else is the answer is yes. The only thing you typically need admin rights for is to install VirtualBox, because of the device drivers, and I'm not sure even that is an issue with v7 on Macs given that kexts are no longer allowed.
multiOS
Volunteer
Posts: 799
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Installing and using VirtualBox without Admin Privs?

Post by multiOS »

As long as the Macs are Intel-based and not upgraded to Ventura, I would suggest trying VirtualBox 6.1 (latest versions of today is 6.1.42) as it is more stable than 7.0.6, which is still having the early 'new software' glitches identified and resolved.

As mpack has stated installation of Virtual Box 6.1.xx needs to 'inject' Kernel Extensions (Kexts) into macOS, which means that, to complete installation, "admin approval" it required via the macOS Settings screen. This is flagged up during the installation.

VirtualBox 6.1 is not compatible with the macOS Ventura release, as Apple blocked the use of 3rd-Party Kexts with that release and transitioned to an alternative method of installation that software developers now have to adopt. VirtualBox 7.0.x for Mac addresses that issue and is compatible with Ventura; and it is also backwards compatible with earlier versions of macOS back to Catalina, which can also support the new installation requirements. Installation of VirtualBox on Ventura does not require admin privileges for actual installation, but there is a catch! On the first run the user is asked to allow VirtualBox to have 'full access' to all system areas and admin privileges are required to grant that permission through the macOS Settings > Security screen.

On the positive side, the installation of either version is relatively quick, a few minutes, once 'you' become familiar with what is required.

Hope we've been able to answer at least some of your questions.
rk_virtualbox
Posts: 4
Joined: 26. Jan 2023, 14:58

Re: Installing and using VirtualBox without Admin Privs?

Post by rk_virtualbox »

Thanks, so just to clarify what the error message was when I tried to create a VM (but initially I had created it without an ISO, which was wrong obviously), I got this message popup "VirtualBox would like to receive keystrokes from any application". . Because I didn't have Admin permissions on the machine, I clicked out (not even clicking Deny), and then later on , I came in to VirtualBox and created successfully an Ubuntu VM (this time using the downloaded ISO, and it seemed to work, with no error messages. However, my confidence was not great , due to the initial error message.
(by the way, even though I had (initially) gotten the popup message saying that"VirtualBox would like to receive keystrokes from any application", and I had clicked out of it, not clicking Deny, nor trying to add that (because I had no admin password on the machine), later on , when I looked inside SystemPreferences, I think (am not sure) it seemed to have added it anyways. Because in the 'Security and Privacy' settings on the Macbook, 'VirtualBox' was listed (in grey) as one application in the place entitled "Allow the apps below to monitor input from your keyboard even while using other apps"

Do you have any thoughts on the above? Do you still think this will be still Ok to use VirtualBox successfully without having the Admin password? Thanks
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing and using VirtualBox without Admin Privs?

Post by scottgus1 »

Not being a Mac user, and getting more surprised by how tight Apple's security settings are reported to be, such that you actually have to grant permission for an app to let you use the keyboard in it ( :shock: ?!) I'd say that if your Mac's security level is that high, then you need admin privileges. If you don't have them, then you have to get the admins to set Virtualbox up for you so the security settings don't block you from actually using the app.
multiOS
Volunteer
Posts: 799
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Installing and using VirtualBox without Admin Privs?

Post by multiOS »

I don't remember seeing this permission request personally, but that might be because my user account has admin privileges. I have checked and there doesn't appear to be a corresponding permission control feature in the System Preferences application, so I would expect a warning 'pop-up' if a Host application attempted to exert some 'control' of the VirtualBox app and that permission hadn't been granted.

I may be wrong, but 'suspect' that a non-admin user in the work environment is unlikely to need to use Host 'applications' to directly control the VirtualBox software on their own computer; and that not allowing VirtualBox to receive keystrokes from Host applications will most probably have little, if any, impact on 'normal' use. However, it might possibly impact on any use of 3rd-party RDP (remote access software) etc.; and could possibly affect any use of the Mac's Terminal to apply VBoxManage commands etc. to tweak the configuration of VMs manually, or to perform specific actions.
LucaJones
Posts: 2
Joined: 4. Aug 2023, 16:40
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows
Contact:

Re: Installing and using VirtualBox without Admin Privs?

Post by LucaJones »

Could using virtualbox without admin privileges hinder its interaction with 3rd party applications like RDP and manual configuration through VBoxManage commands?
How might non admin users' experience differ in controlling virtualbox compared to admin users?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing and using VirtualBox without Admin Privs?

Post by scottgus1 »

Virtualbox and vboxmanage are designed to work correctly without admin privileges. In fact, given the power that Virtualbox has (unbending host OS security to allow another OS to run on the same hardware at the same time) it is strongly recommended to not run Virtualbox with admin privileges.

A few rare circumstances require running Virtualbox with admin privileges:
  1. On Windows hosts, Raw Disk Access requires Virtualbox and vboxmanage to be "Run As Administrator".
  2. On a recent Mac OS (Ventura?) a USB glitch requires a workaround of running Virtualbox under "sudo" to see USB devices (this glitch is being worked on).
  3. On non-Windows hosts, admin privileges are required to edit the file that controls the IP address ranges of Host-Only adapters, to get anything else than 192.168.56.# Host-Only networks.
Under normal circumstances, Virtualbox and vboxmanage should not be run with admin privileges.

RDP clients normally connect to any OS regardless of the logged-in user's privilege level, as long as the RDP service is set up correctly. RDP connects to the Virtualbox RDP server without requiring admin privileges.

How other apps interact with Virtualbox may require admin privileges in the other app.
Post Reply