Page 1 of 1

Multiple Users Accessing One VM (XP)

Posted: 28. May 2008, 14:01
by myrlin
Hi,

I'm a newbie to VirtualBox, and this is my first post on this forum.

I'll try to describe how my machine is set up, and what I'm trying to do.

I have a dual-boot machine, running openSuSE 10.3, and XP(Home). I have a recovery/re-installation disc for XP, created from the original XP installation.

SuSE has 2 users, myself and my wife. I want us both to be able to access XP through VirtualBox, with a view to eventually getting rid of the Windows partition on my hard disk.

I installed Vbox, created a VM, and then installed XP from the disc, while logged in as myself. All went well (apart from XP wingeing about needed to re-authorise). All the data has been stored in /home/my_name/.VirtualBox/. I can run XP perfectly while logged is as myself.

If I log in as my wife, VirtualBox is present as a New Application. I start it up, create a new VM, and tell it to use an existing virtual disc, and point it at the one in my /home directory. All seems to go well, until I try to run the VM, when XP crashes. I get a "Blue Screen Of Death" error message about a hard disk problem, which advises running chkdsk /F to find disk errors.

I have tried copying my .VirtualBox directory into my wife's home directory, and just the virtual disk into /home, but with the same result.

I would be very grateful if someone can help me to get this working

Thanks in advance

Posted: 28. May 2008, 14:32
by Sasquatch
The issue for you is the folder rights. You need permission to read and write to the files. Create a folder that both you and your wife can access, e.g. /home/share/. Put yourself and your wife in the same group (you can create groups too, e.g. share). Put the full permissions on that folder for the group 'share', put the vdi file in it and start the VM. Now both you and your wife can use the VM without any probems.

Posted: 28. May 2008, 15:16
by myrlin
I've tried that, and I get the same result. The problem does not seem to be with VirtualBox, but with XP. VirtualBox starts the XP virtual disc, but then XP itself crashes.

BTW, I'm using the non-OSS Virtualbox 1.6.0

Posted: 10. Jun 2008, 13:35
by bigdaddy
Hello,
I see that we have the same problem, refer to http://forums.virtualbox.org/viewtopic. ... highlight=. The problem in fact is in the write permissions to your VDI image so if you can't write you can't start Windows in another hand if you can write even the both of you, you'll have a lock on your file thus Win.. can't start. Even you'll create 2 images or if you're sure that you will not use Virtualbox at the same time with your wife you copy .Virtualbox to her $home and you point to the same image VDI that will be in a shared folder for the group vboxusers with the same rights as for user as for group.

Posted: 10. Jun 2008, 18:26
by myrlin
Thanks for the reply, and the link, Bigdaddy.

I'll try this out as soon as I can, and post my results.

Posted: 19. Jun 2008, 19:33
by myrlin
Success! This is what I did:

(1) Moved the .VirtualBox (hidden) folder to a jointly accessible directory (e.g. /home/.Virtualbox)
(2) Changed the Group for the folder (from "Properties"), and all its sub-folders to "vboxusers"
(3) Set read and write permission for user AND group
(4) Added this line to each user's ".bashrc" file (in /home/username)
export "VBOX_USER_HOME=/home/.VirtualBox"
(5) Changed the location of Machines and VDI's in Virtualbox to /home/.Virtualbox" for each user

I then re-booted, and everything worked perfectly.

I hope this helps others

Posted: 19. Jun 2008, 23:08
by Sasquatch
myrlin wrote:Success! This is what I did:

(1) Moved the .VirtualBox (hidden) folder to a jointly accessible directory (e.g. /home/.Virtualbox)
(2) Changed the Group for the folder (from "Properties"), and all its sub-folders to "vboxusers"
(3) Set read and write permission for user AND group
(4) Added this line to each user's ".bashrc" file (in /home/username)
export "VBOX_USER_HOME=/home/.VirtualBox"
(5) Changed the location of Machines and VDI's in Virtualbox to /home/.Virtualbox" for each user

I then re-booted, and everything worked perfectly.

I hope this helps others
Instead of modifying the .bashrc file, you could have done 'ln -s /home/.virtualbox ~/.virtualbox'. That creates a symbolic link to that folder. It's a lot easier, because you can copy symlinks too, so you only have to create it once.
Anyway, good that it works.

Posted: 19. Jun 2008, 23:19
by myrlin
Thanks for that, Sasquatch.

I'll do it that way when I re-install in openSuSE 11.0! As you say - it's much cleaner