Access VM from different user accounts

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
PhilDeebob
Posts: 4
Joined: 3. Jan 2018, 10:57

Access VM from different user accounts

Post by PhilDeebob »

Hi, how is it possible to access the same VM but from two different user accounts on the same MacBookPro?

I don't have so much disk space and so would like to access VM and Windows from two different accounts (one is my work account, the other my personal user account)

Thanks for useful info.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access VM from different user accounts

Post by socratis »

Doable, but not easily. The main problem is the permissions which are assigned as read-write for the owner, no access for anyone else. So you could be putting your VMs in "/Users/Shared/VMs" for example, but each and every time that you shut down the VM and you close VirtualBox you got to change the permissions to all-write most probable from the Terminal with "sudo chmod -R a+rw <VMfolder>". A pain, but doable...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
PhilDeebob
Posts: 4
Joined: 3. Jan 2018, 10:57

Re: Access VM from different user accounts

Post by PhilDeebob »

Hi, thanks for the tip, I will see if it's worth it. Effectively at login /shutdown to the particular Mac user account I could get a script to run...ease the pain..
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access VM from different user accounts

Post by socratis »

Just keep in mind that you can't run that script as a simple user. You have to be an Administrator, in order to be able to run "sudo", which is turning you into 'root'. Only 'root' can change the permissions of another user's files.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
PhilDeebob
Posts: 4
Joined: 3. Jan 2018, 10:57

Re: Access VM from different user accounts

Post by PhilDeebob »

Just to be sure I understand this, before I next start the VM - with a different user to the last one using the VM - I have to ensure somehow, that the permissions for the VM folder are set to "all write"? Seems ok if that's all there is to it, especially as you provided the shell command to do this.

Second question, and excuses if it's been answered, if I move the curretn machine location from say "/Users/User1/VMs" to "/Users/Shared/VMs" are there any global variables or other settings I need to be changing?

Many thanks, most helpful :)
Philip
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Access VM from different user accounts

Post by socratis »

PhilDeebob wrote:I have to ensure somehow, that the permissions for the VM folder are set to "all write"?
Not "somehow", there's a pretty specific way to do it, and as I said, it involves being in the Administrators group (so that you can actually run 'sudo'). And not just the folder, but its sub-folders and files as well.
PhilDeebob wrote:I move the curretn machine location from say "/Users/User1/VMs" to "/Users/Shared/VMs" are there any global variables or other settings I need to be changing?
Depends. Read the FAQ "Moving a VM" first. That's for already created VMs.

For future VMs, it's best if you change the "Default Machine Folder" in the VirtualBox preferences to point to the shared directory.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
PhilDeebob
Posts: 4
Joined: 3. Jan 2018, 10:57

Re: Access VM from different user accounts

Post by PhilDeebob »

Perfect, thanks again
Post Reply