Page 3 of 3
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 27. Apr 2009, 04:28
by vboxmember
[CORRECTION]
In the line that reads:
"Ok, I've just checked the file permissions on the xml file in the machines folder, and when the VM was created VirtualBox assigned owner and group to user1, I changed the group to user2. I'm now going to login to user2's account to see if that did the trick..."
Where it says "...I changed the group to user2.", scratch that because thats NOT what I did. Sorry for any confusion this may have caused I was in a hurry to post my results and I ended up making a mistake. Sure would be nice if there was a way to edit posts after they've already been posted.
Detailed description:
So because the VM was not showing up in user1's account, I erased the xml file located in the /.VirtualBox/Machines folder. This allowed me to use the existing VDI file (A virtual hard disk located in /.VirtalBox/HardDisks) to create a new VM from the "NEW" button or "CTRL+N" in the main screen of VirtualBox. This essentially replaces the xml file located in /.VirtualBox/Machines with a new one. However VirtualBox will assign the owner and group of that xml file's permissions as the user that created the new xml file via the "NEW" button or "CTRL+N" command. So after the xml file is created it needs to have the "group" property of its permissions changed to "vboxusers" (using the the 'right+click' menu look under permissions tab of the files properties).
Short Description:
Delete the xml file in the /.VirtualBox/Machines directory
Create a new VM, and use an existing VDI file when you do it. (So you can restore the VM you got rid of when you deleted the XML).
Reset the permissions on the newly created XML file (located in /.VirtualBox/Machines/) leave the owner as is, and change the group to "vboxusers".
This concludes the correction to the previous post. Thank you for your time and patients.
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 27. Apr 2009, 13:20
by Sasquatch
You can edit your post. Just check the top right corner of the post. You will see the Edit button there, it's next to the quote button.
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 28. Apr 2009, 03:34
by vboxmember
Sasquatch,
Oops, ok I see them now.
Those buttons are completely invisible if the user chooses to view websites with a black background.
I had to change the display options in Firefox in order to see the edit button.
I'm only making this clear in case any one else reading this thread is having the same problem.
P.S. There doesn't seem to be a way to mark this thread as solved because I used all the available space in the subject line when the thread was created.
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 28. Apr 2009, 10:18
by Sasquatch
You can't mark it as solved, you have to edit your first post and change the subject to get the [solved] part in the title. I will do that now for you.
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 13. Oct 2009, 14:14
by ogoun
Sasquatch wrote:
The "magic" is in the .VirtualBox folder in your Home folder. If you put that in a generic location, like /home/virtualbox and have the vboxusers group be full owner and read/write permissions. Then you change the location for where VB looks for the settings and VMs by either symlinking to that folder, or simply set the VBOX_USER_HOME variable to that folder.
Good luck.
Sorry for bringing this thread up. The search brings me several threads with this solution.
When I try this I receive the message, that the vdi is already registered in the virtualbox.xml with the same UID.
Here is what I've done:
- mkdir /home/virtualbox
- cp -a /home/user1/.Virtualbox/* /home/virtualbox
- chown and chmod to give the group "vboxusers" full reading and writing permissons.
- Created symlinks in ~/.VirtualBox of user1 and user2
The I tried to add the vdi but both users receive the error message.
TIA for yout help
Ogoun
Re: Linux host with 2 user accounts sharing the same WinXP Guest
Posted: 13. Oct 2009, 14:41
by Sasquatch
ogoun wrote:Sasquatch wrote:
The "magic" is in the .VirtualBox folder in your Home folder. If you put that in a generic location, like /home/virtualbox and have the vboxusers group be full owner and read/write permissions. Then you change the location for where VB looks for the settings and VMs by either symlinking to that folder, or simply set the VBOX_USER_HOME variable to that folder.
Good luck.
Sorry for bringing this thread up. The search brings me several threads with this solution.
When I try this I receive the message, that the vdi is already registered in the virtualbox.xml with the same UID.
Here is what I've done:
- mkdir /home/virtualbox
- cp -a /home/user1/.Virtualbox/* /home/virtualbox
- chown and chmod to give the group "vboxusers" full reading and writing permissons.
- Created symlinks in ~/.VirtualBox of user1 and user2
The I tried to add the vdi but both users receive the error message.
TIA for yout help
Ogoun
You don't register the VDI again, they are already registered. You only need to modify the files to reflect the new location, full path.
Re: [Solved] Linux host with 2 user accounts sharing one Guest
Posted: 13. Oct 2009, 15:19
by ogoun
Then I don't get it
The original user1s VBox still points to its old path /home/user1/.VirtualBox instead of the new /home/virtualbox
And the user2s VBox only shows me an unstartable VM and the following error message and in the "machine manager" it also points to user2s home instead of the /home/virtualbox :
Code: Select all
Assertion failed at '/home/vbox/tinderbox/3.0-lnx32-rel/src/VBox/Main/MachineImpl.cpp' (5030) in nsresult Machine::loadSettings(bool).
Unexpected exception 'N3xml11EInvalidArgE' (In 'xml::File::File(RTFILE, const char*)', '/home/vbox/tinderbox/3.0-lnx32-rel/src/VBox/Main/xml/xml.cpp' at #207).
Please contact the product vendor!.
Fehlercode:
NS_ERROR_FAILURE (0x80004005)
Komponente:
VirtualBox
Interface:
IVirtualBox {3f4ab53a-199b-4526-a91a-93ff62e456b8}
Re: [Solved] Linux host with 2 user accounts sharing one Guest
Posted: 13. Oct 2009, 15:29
by Sasquatch
You copied/moved the .VirtualBox folder contents to /home/virtualbox, so even the VirtualBox.xml file is now there. You should have an empty .VirtualBox folder. With that, symlink to the VirtualBox.xml file:
Code: Select all
ln -s /home/virtualbox/VirtualBox.xml /home/user1/.VirtualBox/VirtualBox.xml
Do the same for user2.
Open the VirtualBox.xml file, and check the paths for the files. They should be relative by default, so you have to modify that to have the full path. So, a VM and VDI would have the entries
Machines/VM/VM.xml and
HardDisks/VM.vdi which need to be changed. Add the full location
/home/virtualbox/, so you get a full path noted.
Re: [Solved] Linux host with 2 user accounts sharing one Guest
Posted: 13. Oct 2009, 15:40
by ogoun
Sasquatch wrote:You copied/moved the .VirtualBox folder contents to /home/virtualbox, so even the VirtualBox.xml file is now there. You should have an empty .VirtualBox folder. With that, symlink to the VirtualBox.xml file:
Code: Select all
ln -s /home/virtualbox/VirtualBox.xml /home/user1/.VirtualBox/VirtualBox.xml
Do the same for user2.
Open the VirtualBox.xml file, and check the paths for the files. They should be relative by default, so you have to modify that to have the full path. So, a VM and VDI would have the entries
Machines/VM/VM.xml and
HardDisks/VM.vdi which need to be changed. Add the full location
/home/virtualbox/, so you get a full path noted.
Ok...I missed to adjust the entries. Thought the relative path can handle this. After a log out and log in it seems to work.
Thanks for your patient help!
Re: [Solved] Linux host with 2 user accounts sharing one Guest
Posted: 13. Oct 2009, 15:56
by Sasquatch
As you found out, the relative paths can't. Because VB looks for the VirtualBox.xml file in ~/.VirtualBox, it then assumes the machines and hard drives are in that same folder. But because you link to the file that's actually on a different location, those relative paths are no longer valid and no machine or VDI can be found.
Re: [Solved] Linux host with 2 user accounts sharing one Gue
Posted: 21. Aug 2012, 07:26
by AdamMemon
This post was very helpful to me.Thanks a lot for the input guyz..
Re: [Solved] Linux host with 2 user accounts sharing one Gue
Posted: 21. Aug 2012, 09:54
by mpack
AdamMemon wrote:This post was very helpful to me.Thanks a lot for the input guyz..
Well, just be careful, because the last message (before yours) in this thread is almost 3 years old and some info is obsolete, e.g. default paths and folder names.