Possible to relocate VDI folder?

This is for discussing general topics about how to use VirtualBox.
Post Reply
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Possible to relocate VDI folder?

Post 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)?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Possible to relocate VDI folder?

Post by vbox4me2 »

Read the manual :lol: its in there, vbox_userhome environment variable.
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Re: Possible to relocate VDI folder?

Post 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! :)
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Re: Possible to relocate VDI folder?

Post 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?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Possible to relocate VDI folder?

Post by vbox4me2 »

No idea as I usually just hack the xml files, much easier :lol:
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Re: Possible to relocate VDI folder?

Post 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?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Possible to relocate VDI folder?

Post 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.
Post Reply