1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="vboxconfigdata-machine-folder">
|
---|
4 | <title>The VM Folder</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>By default, each virtual machine has a directory on your host computer where all the files of that machine are stored: the XML settings file, with a <filepath>.vbox</filepath> file extension, and its disk images. This is called the <uicontrol>VM Folder</uicontrol>.</p>
|
---|
8 | <p>By default, this machine folder is located in a common folder called <filepath>VirtualBox VMs</filepath>, which <ph conkeyref="vbox-conkeyref-phrases/product-name"/> creates in the current system user's home directory. The location of this home directory depends on the conventions of the host operating system, as follows:</p>
|
---|
9 | <ul>
|
---|
10 | <li>
|
---|
11 | <p>On Windows, this is the location returned by the <codeph>SHGetFolderPath</codeph> function of the Windows system library Shell32.dll, asking for the user profile. A typical location is <filepath>C:\Users\<varname>username</varname></filepath>.</p>
|
---|
12 | </li>
|
---|
13 | <li>
|
---|
14 | <p>On Linux, macOS, and Oracle Solaris, this is generally taken from the environment variable <filepath>$HOME</filepath>, except for the user <codeph>root</codeph> where it is taken from the account database. This is a workaround for the frequent trouble caused by users using <ph conkeyref="vbox-conkeyref-phrases/product-name"/> in combination with the tool <userinput>sudo</userinput>, which by default does not reset the environment variable <filepath>$HOME</filepath>.</p>
|
---|
15 | <p>A typical location on Linux and Oracle Solaris is <filepath>/home/<varname>username</varname>
|
---|
16 | </filepath> and on macOS is <filepath>/Users/<varname>username</varname></filepath>.</p>
|
---|
17 | </li>
|
---|
18 | </ul>
|
---|
19 | <p>For simplicity, we abbreviate the location of the home directory as <filepath>$HOME</filepath>. Using that convention, the common folder for all virtual machines is <filepath>$HOME/VirtualBox VMs</filepath>.</p>
|
---|
20 | <p>As an example, when you create a virtual machine called <i>Example VM</i>, <ph conkeyref="vbox-conkeyref-phrases/product-name"/> creates the following:</p>
|
---|
21 | <ul>
|
---|
22 | <li>
|
---|
23 | <p>A VM folder: <filepath>$HOME/VirtualBox VMs/Example VM/</filepath></p>
|
---|
24 | </li>
|
---|
25 | <li>
|
---|
26 | <p>In the VM folder, a settings file: <filepath>Example VM.vbox</filepath></p>
|
---|
27 | </li>
|
---|
28 | <li>
|
---|
29 | <p>In the VM folder, a virtual disk image: <filepath>Example VM.vdi</filepath>.</p>
|
---|
30 | </li>
|
---|
31 | </ul>
|
---|
32 | <p>This is the default layout if you use the <b outputclass="bold">Create New Virtual Machine</b> workflow described in <xref href="create-vm.dita"/>. Once you start working with the VM, additional files are added. Log files are in a subfolder called <filepath>Logs</filepath>, and if you have taken snapshots, they are in a <filepath>Snapshots</filepath> subfolder. For each VM, you can change the location of its snapshots folder in the VM settings.</p>
|
---|
33 | <p>To change the default VM folder:<ol>
|
---|
34 | <li>In <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, click <uicontrol>File</uicontrol>, <uicontrol>Preferences</uicontrol>.</li>
|
---|
35 | <li>In <uicontrol>Preferences</uicontrol>, click <uicontrol>General</uicontrol> and change the <uicontrol>Default Machine Folder</uicontrol>.</li>
|
---|
36 | </ol>Alternatively, use the <userinput>VBoxManage setproperty machinefolder</userinput> command. See <xref href="../cli_topics/vboxmanage-setproperty.dita"/>.</p>
|
---|
37 | </body>
|
---|
38 |
|
---|
39 | </topic>
|
---|