Share VM between two Mac OS X users
Share VM between two Mac OS X users
Hi there,
i'm totally new to VirtualBox but i'm very impressed by both the software and the community around it. I want to give VirtualBox a try against my current solution based on Parallels.
But my greatest challenge is to share the same VM with my wife on the same computer. I found a way to use the same disk image with two different VMs but this does not solve my problem.
We make intensive use of the suspend feature. For example I suspend the VM and my wife wakes it up and sees the guest system in the state I have left it. So we need the same VM in use but I can't get this to work for me...
When I create a VM on my account and change to my wife's I don't see any VMs in the list.
Can anyone help me?
Best regards
moojoo
i'm totally new to VirtualBox but i'm very impressed by both the software and the community around it. I want to give VirtualBox a try against my current solution based on Parallels.
But my greatest challenge is to share the same VM with my wife on the same computer. I found a way to use the same disk image with two different VMs but this does not solve my problem.
We make intensive use of the suspend feature. For example I suspend the VM and my wife wakes it up and sees the guest system in the state I have left it. So we need the same VM in use but I can't get this to work for me...
When I create a VM on my account and change to my wife's I don't see any VMs in the list.
Can anyone help me?
Best regards
moojoo
-
Technologov
- Volunteer
- Posts: 3342
- Joined: 10. May 2007, 16:59
- Location: Israel
I'm in no way Mac expert, but I still try to help...
I believe it is possible by using some shared folder on Mac OS X.
Is there such thing on OS X ?
How do you share pictures and data between users?
(same way should work with VirtualBox - basically you need to share the virtual hard disk *.vdi)
-Technologov
I believe it is possible by using some shared folder on Mac OS X.
Is there such thing on OS X ?
How do you share pictures and data between users?
(same way should work with VirtualBox - basically you need to share the virtual hard disk *.vdi)
-Technologov
Hi Technologov,
thanks for your reply. Yes there's a shared folder concept on Mac OS X and it's freely configurable with Access Control Lists. I'm also able to share the *.vdi-file with this concept.
But when I create a VM using the shared vdi-file, I don't see the VM on the other account. I can create a second VM that uses the shared vdi-file but that's not what I need, because of the pause/resume-issue.
-moojoo
thanks for your reply. Yes there's a shared folder concept on Mac OS X and it's freely configurable with Access Control Lists. I'm also able to share the *.vdi-file with this concept.
But when I create a VM using the shared vdi-file, I don't see the VM on the other account. I can create a second VM that uses the shared vdi-file but that's not what I need, because of the pause/resume-issue.
-moojoo
Hi folks,
thank you for your help but nothing helped out yet. But I found a solution on my own and I think this solution works:
Every User has a VirtualBox.xml within his Library-folder on Mac OS X. So I copied my VirtualBox.xml to the Shared folder and created a symbolic link (in Terminal with the "ln"-command) to the file on my Library-folder and on the folder of my wife.
Since then the VBox GUI shows up the configured VMs in both accounts and I am able to start and suspend the machine from within every account. I'm quite happy with this solution.
@h1d: I never gonna start the same VM or two VMs with same VDI at one time - we have one rule: everytime we finished our work in the VM we have to suspend it and quit the application...
-moojoo
thank you for your help but nothing helped out yet. But I found a solution on my own and I think this solution works:
Every User has a VirtualBox.xml within his Library-folder on Mac OS X. So I copied my VirtualBox.xml to the Shared folder and created a symbolic link (in Terminal with the "ln"-command) to the file on my Library-folder and on the folder of my wife.
Since then the VBox GUI shows up the configured VMs in both accounts and I am able to start and suspend the machine from within every account. I'm quite happy with this solution.
@h1d: I never gonna start the same VM or two VMs with same VDI at one time - we have one rule: everytime we finished our work in the VM we have to suspend it and quit the application...
-moojoo
Thanks Moojoo!!
That is exactly what I was looking for. I cannot wait to try it tonight.
-
wayneham
- Posts: 1
- Joined: 28. Mar 2009, 17:08
- Primary OS: Mac OS X Leopard
- VBox Version: OSE other
- Guest OSses: Windows XP
Re: Share VM between two Mac OS X users
moojoo: working on this but can you give more detail on the Terminal command for symbolic link? I've tried a Finder alias and that does not work.
Re: Share VM between two Mac OS X users
Just open the Terminal, move to Library/VirtualBox/ and type
In my case this is
This will create a symbolic link in the current directory. A symbolic link is treated like the physical file from the OS.
Good luck
Achim
Code: Select all
ln -s [fullpathtoyoursharedvirtualbox.xml]Code: Select all
ln -s /Users/Shared/VirtualBox/VirtualBox.xmlGood luck
Achim
-
marcelo1402
- Posts: 1
- Joined: 25. Oct 2009, 14:47
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Windows 7
Re: Share VM between two Mac OS X users
Moojoo thank for your help but i didn't get success with ln -s command. It return a error message - ln: ./virtualbox.xml: File exists.
I thought that with this message problem was solved, but when i log on with my wife account i didn't find VM. Could you help me?
I thought that with this message problem was solved, but when i log on with my wife account i didn't find VM. Could you help me?
-
vmmaestro
- Posts: 12
- Joined: 15. Jul 2009, 16:16
- Primary OS: MS Windows XP
- VBox Version: OSE Debian
- Guest OSses: Win XP
Re: Share VM between two Mac OS X users
The simplest way:
- Place YourVM.VDI + YourVM.XML for your VM in shared folder that is outside of the User directories.
- Edit\Copy the User\Name\Library\Virtualbox\VirtualBox.xlm file so it is the same for both users.
Everything should work fine.
- Place YourVM.VDI + YourVM.XML for your VM in shared folder that is outside of the User directories.
- Edit\Copy the User\Name\Library\Virtualbox\VirtualBox.xlm file so it is the same for both users.
Everything should work fine.
Re: Share VM between two Mac OS X users
It's exactly the problem as described in the error message: the file already exists. So you have to delete the virtualbox.xml file first (You can use Finder if you don't know how to do this in Terminal). After that, the creation of a symbolic link will be successful.marcelo1402 wrote:Moojoo thank for your help but i didn't get success with ln -s command. It return a error message - ln: ./virtualbox.xml: File exists.
I thought that with this message problem was solved, but when i log on with my wife account i didn't find VM. Could you help me?
Achim
-
jmscholen
- Posts: 1
- Joined: 19. Feb 2010, 16:32
- Primary OS: Mac OS X other
- VBox Version: OSE other
- Guest OSses: Win 7
Re: Share VM between two Mac OS X users
I am trying to do the same thing, but I get an error when I try and start up VB in the other users account....do I need to install windows on the other users account first before I create the link to the shared folder?
The error I get: Failed to create the VirtualBox COM object.
The error I get: Failed to create the VirtualBox COM object.
-
OCR14a
- Posts: 10
- Joined: 14. Oct 2009, 16:45
- Primary OS: Ubuntu 8.04
- VBox Version: OSE Debian
- Guest OSses: none yet
Re: Share VM between two Mac OS X users
I'm trying to do the same thing, but I need a solution in which I can just set it once, for everyone.
I can't keep going back in and editing or copying/pasting files around every time a new user logs into the Mac.
Is there a way of just setting up a VM that can be used by ANYONE/EVERYONE?
I can't keep going back in and editing or copying/pasting files around every time a new user logs into the Mac.
Is there a way of just setting up a VM that can be used by ANYONE/EVERYONE?
-
OCR14a
- Posts: 10
- Joined: 14. Oct 2009, 16:45
- Primary OS: Ubuntu 8.04
- VBox Version: OSE Debian
- Guest OSses: none yet
Re: Share VM between two Mac OS X users
I figured out a limited-solution...
1. create a folder where you will store the VM and all related files to be shared with all users later. This folder can be anywhere, but higher in the hierarchy makes it less complicated to set permissions on. I put mine at the root of the HD, and named it 'VirtualMachines'
2. Move the vdisk file into the newly created folder. In my case, that is the .vdi file associated with the VM. Previously, it resided in the following location…
/users/username/virtualbox vas
3. Move all necessary related files into the 'shared folder'…
a. /users/username/virtualbox vms/vmName.vbox
b. /users/username/library/virtualbox/virtualbox.xml
4. Create a group in 'Accounts' that will be used to give users access to the VM/s (I named my group 'VMGroup'), and place all relevant users into that new group.
5. Change permissions on the 'shared folder' so that 'VMGroup' has read/write access to the folder.
6. Set the permissions to propagate to all child objects with the 'Apply to enclosed items' option.
7. Edit the two files (vmName.xml and vmName.vbox) to make sure the paths all line up correctly with their new homes. You'll just have to open the two files in text editor and look for obvious paths, and change them to match where they are actually located now after you moved them to the 'shared folder'.
8. Add VM for each user
Now, when a new user wants to use the VM, they just have to 'Add' it via the 'Machine' menu within VirtualBox (i.e. NOT 'New' or 'Import', or anything else, but 'ADD').
Now they can all use the same VM.
Of course, it would be nice if there were a way to do it so that I don't even have to help each use 'ADD' the VM, but at least this is better than having to go in and reconfigure all of the settings for each and every new user.
If you have a way of configuring it so that the VM will automatically show up for each and every new user when they first open VirtualBox, please let me know.
Thanks.
1. create a folder where you will store the VM and all related files to be shared with all users later. This folder can be anywhere, but higher in the hierarchy makes it less complicated to set permissions on. I put mine at the root of the HD, and named it 'VirtualMachines'
2. Move the vdisk file into the newly created folder. In my case, that is the .vdi file associated with the VM. Previously, it resided in the following location…
/users/username/virtualbox vas
3. Move all necessary related files into the 'shared folder'…
a. /users/username/virtualbox vms/vmName.vbox
b. /users/username/library/virtualbox/virtualbox.xml
4. Create a group in 'Accounts' that will be used to give users access to the VM/s (I named my group 'VMGroup'), and place all relevant users into that new group.
5. Change permissions on the 'shared folder' so that 'VMGroup' has read/write access to the folder.
6. Set the permissions to propagate to all child objects with the 'Apply to enclosed items' option.
7. Edit the two files (vmName.xml and vmName.vbox) to make sure the paths all line up correctly with their new homes. You'll just have to open the two files in text editor and look for obvious paths, and change them to match where they are actually located now after you moved them to the 'shared folder'.
8. Add VM for each user
Now, when a new user wants to use the VM, they just have to 'Add' it via the 'Machine' menu within VirtualBox (i.e. NOT 'New' or 'Import', or anything else, but 'ADD').
Now they can all use the same VM.
Of course, it would be nice if there were a way to do it so that I don't even have to help each use 'ADD' the VM, but at least this is better than having to go in and reconfigure all of the settings for each and every new user.
If you have a way of configuring it so that the VM will automatically show up for each and every new user when they first open VirtualBox, please let me know.
Thanks.