My 1st VB VM has its files in multiple locations, but can't be shared by all Mac OS host users.

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
ant
Posts: 359
Joined: 9. Jul 2007, 20:02
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Windows and macOSes
Location: An Ant Farm
Contact:

My 1st VB VM has its files in multiple locations, but can't be shared by all Mac OS host users.

Post by ant »

Hello.

I just made/created a VirtualBox v5.1.20 VM of Mac OS X v10.11.6 El Capitan in a 13.3" MacBook Pro's 500 GB SSD (Mac OS Sierra v10.12.4). I told it to keep my VM in /Users/Shared/VB VMs/ so other Mac OS users can use it beside me. However, I noticed it only has the huge Mac OS X v10.11.6 El Capitan.vdi file and /Users/ant/VirtualBox VMs/Mac OS X v10.11.6 El Capitan has many files like logs, snapshots, vbox, etc. Why can't it be in one shared location I told it to do? Other users can't use it too. :( VMware Fusion had no problems with this setup in the past.

Thank you in advance. :)
Last edited by ant on 19. Apr 2017, 23:49, edited 1 time in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: My 1st VB VM has its files in multiple locations.

Post by socratis »

You allocated the hard drive not in its default location as set in the preferences, that's why:
  1. VirtualBox preferences » Default Machine folder » that's where new VMs are stored. If you want to move an existing VM, see #2.
  2. Moving a VM.
  3. For a general reference, see the User Manual, Ch. 10.1 Where VirtualBox stores its files.
PS. If you keep on complaining to your new wife about how your mother used to do things "differently", is not going to get you very far in your marriage. Just saying...

PS2. Your complete specifications are not always required. If they are, you'd be told to include them. You'd have the exact same problem if you had an Cray cluster with 1 TB or RAM and 5 PB of hard drive, which sort of makes the specification irrelevant to the problem.
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.
ant
Posts: 359
Joined: 9. Jul 2007, 20:02
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Windows and macOSes
Location: An Ant Farm
Contact:

Re: My 1st VB VM has its files in multiple locations.

Post by ant »

socratis wrote:You allocated the hard drive not in its default location as set in the preferences, that's why:
  1. VirtualBox preferences » Default Machine folder » that's where new VMs are stored. If you want to move an existing VM, see #2.
  2. Moving a VM.
  3. For a general reference, see the User Manual, Ch. 10.1 Where VirtualBox stores its files.
...
Thanks. I managed to change and move them into /Users/Shared/VB VMs/. I did have problems booting due to a guest's kernel panic right away before loading Mac OS v10.11.6 El Capitan which was weird. I rebooted and then it worked.

I tried another Mac OS accounts (standard instead of admin), but it failed because of access. So I went back to my admin account and chmod -R 777 /Users/Shared/VB VMs/. It worked in the standard account. However, going back to admin account to use it said access denied again because it chmod 700! I had to chmod -R 777 again. This is annoying. Is there a way let VMs be accessible by everyone?
Last edited by ant on 19. Apr 2017, 23:49, edited 1 time in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: My 1st VB VM has its files in multiple locations.

Post by socratis »

ant wrote:Other users can't use it too.
I just wanted to address that shared files in the '/Users/Shared' are not by default read-write in OSX, which means that it's not going to be as simple as you imagine. Mainly because the VirtualBox's assumption is that the files are read-write, but OSX's assumption is that everybody can create, but only the owner has read-write access, the rest are read-only.

There are ways to actually make this happen, but they are not standard, nor safe practices for OSX, so I can't recommend them.
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.
ant
Posts: 359
Joined: 9. Jul 2007, 20:02
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Windows and macOSes
Location: An Ant Farm
Contact:

Re: My 1st VB VM has its files in multiple locations.

Post by ant »

Ah, what's the best way to have all local Mac OS users (admin and standard) be able to use these VB VMs? I had to keep chmod -R 777 for each account to use the VM. :(
Last edited by socratis on 19. Apr 2017, 23:51, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: My 1st VB VM has its files in multiple locations, but can't be shared by all Mac OS host users.

Post by socratis »

The easiest way would be to have a separate partition or another hard drive (external even) where you've set the "Ignore ownership" flag. You could have it formatted with exFAT for easier portability even... Having said that:
  1. It has nothing to do with admin vs. non-admin. It has to do with a different user.
  2. If you do not know what POSIX permissions and ACLs are, I'd stay away from it.
  3. If you do not know what a 'umask' is, I'd stay away from it.
  4. Take a look at #2 and #3 again.
  5. Longer explanation: the 'umask' for newly created files on OSX is 0228 and if you combine it with the default create permissions of 7778 in /Users/Shared/, you get a file with 7558 or else, 'rwxr-xr-x', aka read-write for the owner and read-only for everyone else. If you want to change that, you'll have to change it throughout the system. Danger...
  6. If you insist, read the following: Setting a custom umask in OS X.
  7. No, that's all the help you're going to get. From me at least. I'm not going to help you ruin your system.
  8. No, it's not VirtualBox's "fault", that's how OSX works.
Again, having said that, there is a less dangerous, but more work-prone solution. Every time you log on as a different user you could issue a:
  • sudo chmod -R go+w /Users/Shared
I wouldn't personally go for the "777" option but for the "go+w" one. Huge difference...
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.
ant
Posts: 359
Joined: 9. Jul 2007, 20:02
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Windows and macOSes
Location: An Ant Farm
Contact:

Re: My 1st VB VM has its files in multiple locations, but can't be shared by all Mac OS host users.

Post by ant »

Thanks socratis! I will check those out. :)
Post Reply