Virtualbox: Can add storage device to windows VM only in root

When I run virtualbox using sudo, I am able to set the installation of a windows 10 .iso to a new virtual machine by selecting the file through settings->Storage and double clicking on the empty storage device. When I do this I am able to run the virtual machine and the install starts (I do not want to finish the install due to licensing).

When I run virtualbox as the user, I am unable to add any new storage devices. The buttons to select any additional storage devices are all greyed out. For obvious reasons, this looks like a permissions thing.

Generally, I do not thing it is a great Idea to run anything as root as a matter of practice.

I am using the following guide:
https://wiki.manjaro.org/index.php/VirtualBox

Any help would be appreciated.

If you used that guide
and added your user account to the “vboxusers” group
sudo gpasswd -a $USER vboxusers
you are able to fully control every aspect of the program without sudo or root rights.

Perhaps I misunderstand what you did or wanted to do
but to add a storage device
you need a controller (IDE or SATA or something else… from the available options)
and an actual drive/ a medium attached to that controller
(in your case: your *.iso file)

… as in:
you need a (IDE or SATA) CD-ROM drive
and you need to put a CD into it
to use what is on it …
and, of course, you need to enable it in the “System” tab to be able to boot from it

Perhaps running the program via sudo you have already altered (messed up …) the permissions of the configuration files in your HOME directory so that you cannot change them as a user anymore?

ls -hl ~/VirtualBox\ VMs/
ls -hl ~/.config/VirtualBox

these
and everything in them
should be read/write only to your user
(this is how they are here, for me, at least)

Thank you, removing the Virtualbox files in .config by moving them to another directory, seemed to fix the problem. I did not see any permission issues with any of the files.

Thank you. I now have a starting point for installing windows as a virtual machine when I get a license key.

Just because I recently needed a quick way of deploying a windows VM
without the time consuming installation
I looked for and found this:

Virtual Machines - Microsoft Edge Developer

download and use - legal to use (and even encouraged) for 90 days

It may help. :wink:

Thank you for the input, but it is not what I am looking for. My goal and intent for the virtual machine is to be able to switch quickly between Windows and Linux using one computer. I am sure I will find other uses for Virtualbox once I play with it more.

Again thank you for your helpful feedback.

edit: oops, I think I understand what you are saying now. I could have used the virtual machine provided with my Virtualbox install and used my license key with it (assuming a bunch of things)

… probably not - these already have a license/are licensed - for ~90 days
It’s just a fully functional Windows VM that is ready to use in minutes because there is no installation.
Just import the appliance into the VM, which is quick,
whereas an installation easily takes hours.

Cheers!