I have installed VirtualBox 6.1 on Kubuntu 20.04.2. I would like to create a virtual machine shared among different host users.
Practical example of what I would like to do
Monday user Foo turns on the host linux PC, login with their credentials and launch the VM.
Tuesday user Bar turns on the host linux PC, login with their credentials and launch the same VM.
Wednesday user Baz... and so on
I have tried to create a vm into a path external to homedirs (ie /opt), then I have granted 666 attributes to .vdi virtual disk and .vbox conf file.
Such solution doesn't work, since the .vbox conf file can be read/written only from the owner host user, irrespective the 666 attribute. Otherwise an error occurrs: it sounds like hash (???) doesn't meet the (non owner) user.
[Solved] How to create a shared VM
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: How to create a shared VM
This works on Windows, but does not work on Linux, because of:korda wrote:I have tried to create a vm into a path external to homedirs
Forum guru Socratis and I had a conversation on this once.korda wrote:the .vbox conf file can be read/written only from the owner host user, irrespective the 666 attribute.
The only way I could see to work-around is this:
Put the VM back in the owner's home folder.
Move the VM's disk file to the public folder that all users can write to.
Make copies of the VM folder, which still contains the .vbox file but not the disk file, in each user's home folder, and register the .vbox file in each user's Virtualbox.
Don't use snapshots and don't allow the users to change the VM's hardware settings or save-state the VM. (Virtualbox does not have a way to 'lock' unauthorized users from changing the VM's settings. You can shut off things in the VM's window GUI using the Settings "User Interface" tab, but savvy users can set them all back. You'll have to enforce this through backups and pink-slip/grounding threats. )
Another alternative, let each user have their own VM.
-
- Volunteer
- Posts: 2561
- Joined: 30. May 2007, 18:05
- Primary OS: Fedora other
- VBox Version: PUEL
- Guest OSses: XP, Win7, Win10, Linux, OS/2
Re: How to create a shared VM
Do the users need to interact with the Virtualbox interface?
If not you could try to implement an autostarting VM owned by a technical user and let the other users connect to it using RDP/SSH/xyz.
If not you could try to implement an autostarting VM owned by a technical user and let the other users connect to it using RDP/SSH/xyz.
Re: How to create a shared VM
Autostart of vm could be a good idea but, for my purposes, I would like to have a one shot vm to launch when needed and stop it after effective use. A more detailed example: onto this vm I will install MS Office. Whenever users need to edit with Word or Excel they will launch vm, edit their files, and stop vm once finished. I don't like solutions like PlayOnLinux for using Windows softwares.Martin wrote:Do the users need to interact with the Virtualbox interface?
If not you could try to implement an autostarting VM owned by a technical user and let the other users connect to it using RDP/SSH/xyz.
How can I register the .vbox file? I have made a copy in each user's home folder, and added from the GUI a new virtual machine pointing to that file. But when I try to launch it error occurs (I'll take care of posting a screenshot next time it happens).scottgus1 wrote:Put the VM back in the owner's home folder.
Move the VM's disk file to the public folder that all users can write to.
Make copies of the VM folder, which still contains the .vbox file but not the disk file, in each user's home folder, and register the .vbox file in each user's Virtualbox.
Never mind, the other users aren't power users. There is no risk that they could accidentally set something elsescottgus1 wrote: Don't use snapshots and don't allow the users to change the VM's hardware settings or save-state the VM. (Virtualbox does not have a way to 'lock' unauthorized users from changing the VM's settings. You can shut off things in the VM's window GUI using the Settings "User Interface" tab, but savvy users can set them all back. You'll have to enforce this through backups and pink-slip/grounding threats. )
Such solution is annoying for admins (me), since they have to mantain more then one centralized vmscottgus1 wrote: Another alternative, let each user have their own VM.
-
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: How to create a shared VM
In the main Virtualbox window, Machine menu, Add command, browse to the user's copy of the .vbox file, and open it.korda wrote:How can I register the .vbox file? I have made a copy in each user's home folder,
You'll have to clear out the VMs you tried to make.
Regular users are the ones that bung everything up!korda wrote:the other users aren't power users. There is no risk that they could accidentally set something else
Re: How to create a shared VM
BTW, ho can I update the title of this discussion by adding a SOLVED tag?
Last edited by mpack on 2. May 2021, 12:21, edited 2 times in total.
Reason: Deleted unnecessary verbatim quote.
Reason: Deleted unnecessary verbatim quote.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: How to create a shared VM
Done.korda wrote:BTW, ho can I update the title of this discussion by adding a SOLVED tag?