1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="vboxconfigdata-machine-folder">
<title>The VM Folder</title>
<body>
<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>
<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>
<ul>
<li>
<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>
</li>
<li>
<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>
<p>A typical location on Linux and Oracle Solaris is <filepath>/home/<varname>username</varname>
</filepath> and on macOS is <filepath>/Users/<varname>username</varname></filepath>.</p>
</li>
</ul>
<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>
<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>
<ul>
<li>
<p>A VM folder: <filepath>$HOME/VirtualBox VMs/Example VM/</filepath></p>
</li>
<li>
<p>In the VM folder, a settings file: <filepath>Example VM.vbox</filepath></p>
</li>
<li>
<p>In the VM folder, a virtual disk image: <filepath>Example VM.vdi</filepath>.</p>
</li>
</ul>
<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>
<p>To change the default VM folder:<ol>
<li>In <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/>, click <uicontrol>File</uicontrol>, <uicontrol>Preferences</uicontrol>.</li>
<li>In <uicontrol>Preferences</uicontrol>, click <uicontrol>General</uicontrol> and change the <uicontrol>Default Machine Folder</uicontrol>.</li>
</ol>Alternatively, use the <userinput>VBoxManage setproperty machinefolder</userinput> command. See <xref href="../cli_topics/vboxmanage-setproperty.dita"/>.</p>
</body>
</topic>
|