How can I restore virtualbox settings?

MrF

Gawd
Joined
Feb 18, 2009
Messages
707
After restoring the host (Windows), is there any easy way for restoring the existing virtual machines?

I can click on "New" and set up a new machine and select an existing vdi and set the memory size and other settings.

Where are all the settings stored?
Can they be reloaded after a fresh install?
 
My VirtualBox settings are stored in the /<user dir>/.VirtualBox/Machines/<vm name>/<vm name>.xml (the directory structure may be slightly in Windows, but I imagine it has some similarity).

For example here's a snippet from my Windows 7 settings file:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Sun xVM VirtualBox Machine Configuration -->
<VirtualBox xmlns="http://www.innotek.de/VirtualBox-settings" version="1.6-linux">
  <Machine uuid="{3773a567-20d9-462c-ac3c-cea9acf23656}" name="Winblows 7" OSType="Windows7_64" lastStateChange="2009-03-25T02:35:09Z">
    <ExtraData>
      <ExtraDataItem name="GUI/SaveMountedAtRuntime" value="no"/>
      <ExtraDataItem name="GUI/LastWindowPostion" value="1,23,1678,1023"/>
      <ExtraDataItem name="GUI/Fullscreen" value="off"/>
      <ExtraDataItem name="GUI/Seamless" value="off"/>
      <ExtraDataItem name="GUI/AutoresizeGuest" value="on"/>
    </ExtraData>
    <Hardware>
      <CPU count="1">
        <HardwareVirtEx enabled="true"/>
        <HardwareVirtExNestedPaging enabled="true"/>
      </CPU>
      <Memory RAMSize="512"/>

At the very least you could do a search for the <vm name>.xml and find the file. Hope this helps!
 
Thanks for your post.

virtualbox lets you change the location of Disk folder and Machine folder through the GUI by clicking on "File/Preferences".
But, it does not give you control over the location of the system configuration data (.VirtualBox folder).

The solution is specified in the user's manual under "Advanced topics":
VirtualBox creates this configuration directory automatically, if necessary. Optionally, you can supply an alternate configuration directory by setting the VBOX_USER_HOME environment variable.

I just set this environment variable on Windows 7 and it worked perfectly.

So, the answer to my question is to relocate the .VirtualBox folder to a different partition as described. After a host OS restore, set the environment variable before running virtualbox for the first time and all the virtual machines will be as they were.
 
Back
Top