Page 1 of 1

Sharing VMs with multiple (Ubuntu) users

Posted: 18. Aug 2011, 20:37
by cktdesigner
Just wondering if there is a way to share a VM among multiple users. In particular, I'm running a Ubuntu 11.04 system. The OS, etc. is stored on a 64 Gbyte SSD. User files are housed on a traditional drive.

I installed VirtualBox (and it resides on the SSD). When creating VMs, I set the preferences so that the virtual drives are also stored on the SSD. Since the .vdi files can be large, it would be nice to have them be used by multiple users. I saw a thread from a couple of years ago on another forum (a Ubuntu forum) that discussed this, but wondered if there were more current thoughts. Although it would be nice to have concurrent access, I realize that this is not practical; I'd be happy just to be able to share the basic VM .vdi

On a related note, is it practical to try to use a separate .vdi for /home for Linux style VMs? It seems that most of the OS, libraries, applications, etc. could be made to be read-only, thereby allowing much of the VM storage to be shared.

Re: Sharing VMs with multiple (Ubuntu) users

Posted: 19. Aug 2011, 20:27
by Sasquatch
The thread you found is probably still applicable. Just make a shared folder for all users to access, set VBOX_USER_HOME for the users that need access to the VM (they will all use the same VM definitions, if one creates a new VM, the others will see it as well) and make a script that runs chmod to restore proper read/write permissions on the files in use.

If you only want to share the VDI, that's fine, but keep in mind that the settings on every user MUST be the same, down to the MAC address(es) of the NIC(s). And you need to reset the permissions on the VDI every time it's ran, like the above scenario.

The command to restore permissions is probably in the Ubuntu Forums thread you found, but I've written it in the Mac Host section to for someone who wanted the same on his system.