How can I change where Vagrant is looking for its virtual hard drive?

I have a tramp configured on one of my computers. I would like to change the location of my virtual hard drive, which is currently in the default location. How can I do this without breaking the tramp?

I have a firewall with VirtualBox 4.2.

EDIT: I want to say that I want to move the folder location of the VirtualBox machine, which is currently located in C:\Users\Kevin\VirtualBox VMs\my_vm\box-disk1.vmdk .

+12
vagrant
Jul 16 '13 at 21:50
source share
3 answers

Not sure if you want to change the default machine folder to ~/.vagrant.d or VirtualBox.

If you want to move ~/.vagrant.d to another location. You can set the environment variable VAGRANT_HOME , see. This is https://stackoverflow.com/a/29304/ ...

Update:

To change the Machine Machine default folder VirtualBox, do it in the GUI => Prefs - General - Default Machine Folder or manually edit ~/.VirtualBox/VirtualBox.xml

 <SystemProperties defaultMachineFolder="/path/to/VirtualBox/VMs" defaultHardDiskFormat="VDI" VRDEAuthLibrary="VBoxAuth" webServiceAuthLibrary="VBoxAuth" LogHistoryCount="3"/> 
+21
Jul 16 '13 at 22:54 on
source share

you can use the command:

 VBoxManage setproperty machinefolder 

here is a document for more information: https://www.virtualbox.org/manual/ch08.html#vboxmanage-setproperty

+3
Aug 29 '16 at 18:14
source share

You should change your ~ / .VirtualBox / VirtualBox.xml defaultMachineFolder "SystemProperty" (see another answer). As already mentioned, this is similar to a system property / environment variable.

If you started the firewall from the Windows console already working , the old value is used, and even the edited VirtualBox.xml file is overwritten!

Therefore, do not forget to close and open a new CMD window. after change.

+1
Jul 28 '15 at 20:43
source share



All Articles