Page 1 of 1

Possible to relocate VDI folder?

Posted: 14. Aug 2010, 22:36
by kebabbert
I wonder if it is possible to relocate all VDIs? As of now, all VDIs end up in the ~/.VirtualBox folder. This is not good when I want to create a differencing disk, ontop a immutable disc. My girl friend, I and my friend want to both use the differencing disk (which will be immutable too):

1) Windows: is pure immutable Windows. Nothing installed. This is in a common folder all of us can reach.
2) Base Windows: Lots of stuff installed: guest additions, MS Office, Firefox, etc. This is a differencing disk based on 1). And it must be immutable and autoreset is off I suspect.
3) My personal customized Windows which is based on 2)
4) My girl friend's customized Windows which is based on 2)
5) My friend's customized Windows which is based on 2)

For this to happen, all of us must be able to reach 2) which must be in a common folder. As of now, number 1) and 2) ends up in my ~/.VirtualBox folder, with the result that no one can reach 1) and 2).

A question, does it suffice if everyone only sees 2), or must they see 1) and 2)?

Re: Possible to relocate VDI folder?

Posted: 15. Aug 2010, 15:44
by vbox4me2
Read the manual :lol: its in there, vbox_userhome environment variable.

Re: Possible to relocate VDI folder?

Posted: 16. Aug 2010, 22:29
by kebabbert
vbox4me2 wrote:Read the manual :lol: its in there, vbox_userhome environment variable.
Thank you. I skimmed the manual, but didnt know what to search for, I tried to find information about "preferences" where I set default folders. Now I know I have to use VBOX_USER_HOME environment variable. Thank you for pointing this out! :)

Re: Possible to relocate VDI folder?

Posted: 20. Aug 2010, 23:37
by kebabbert
In the manual it says
"You can globally change some of the locations where VirtualBox keeps extra configuration and data by selecting "Global settings" from the "File" menu in the VirtualBox main window. Then, in the window that pops up, click on the "General" tab."

So, does it suffice to just set the VBOX_USER_HOME variable, or must I also do as quoted above?

Re: Possible to relocate VDI folder?

Posted: 21. Aug 2010, 12:57
by vbox4me2
No idea as I usually just hack the xml files, much easier :lol:

Re: Possible to relocate VDI folder?

Posted: 23. Aug 2010, 10:54
by kebabbert
vbox4me2 wrote:No idea as I usually just hack the xml files, much easier :lol:
Are there any documents that describe the XML file syntax, or have you just figured it yourself?

Re: Possible to relocate VDI folder?

Posted: 23. Aug 2010, 14:01
by mpack
VBOX_USER_HOME determines the location of the VirtualBox.xml file, which otherwise is always stored in the <userdata>\.VirtualBox folder. This environment variable is the only way to change the location of VirtualBox.xml (hacking an xml that the software can't find is not going to be very fruitful).

VirtualBox.xml itself determines the location of other folders, such as the default folders for VM settings and hard disk image files.