VirtualBox saves all virtual machine (VM) files in a default directory called VirtualBox VMs, typically located in the user’s home folder. This directory stores each VM's configuration and virtual disk files. By default, VirtualBox stores all VMs in this directory, which can lead to disk space issues or performance limitations if the home drive is limited in size or speed.
To manage disk space more efficiently, you can change the default VM location. This is useful when you have a larger or faster external or secondary drive. Changing the location allows VirtualBox to store new virtual machines in a specified folder without cluttering the home directory.
The default machine folder can be adjusted directly within VirtualBox settings. Once changed, all future virtual machines will be saved in the new folder. Existing virtual machines remain in the original location unless you move them manually.
$ mkdir -p ~/Workspace/VMs/VirtualBox








You can also change the default machine folder using the command line interface with VBoxManage. Below is a step-by-step guide to set the default VM folder location via CLI:
mkdir -p ~/Workspace/VMs/VirtualBox
VBoxManage setproperty machinefolder ~/Workspace/VMs/VirtualBox
VirtualBox global configuration property "machinefolder" set to "/home/username/Workspace/VMs/VirtualBox"
VBoxManage list systemproperties | grep "Default machine folder"
Default machine folder: /home/username/Workspace/VMs/VirtualBox