Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
The default location is ~/VirtualBox\ VMS. How can I change it in command line? (GUI is not an option)?
This is a global VirtualBox property, and can be set with the following command:
vboxmanage setproperty machinefolder /path/to/directory/
Be aware that this will not move already created VMs, it will affect only VMs which are created after the machinefolder property has been set.
vboxmanage list systemproperties | grep folder
Required, but never shown