I have executed following commands (on Windows, using Git Bash) in the directory D:\vagrant\precise32\02-lamp\
$ vagrant box add precise32 http://files.vagrantup.com/precise32.box
$ vagrant init precise32
$ vagrant up
Note. I haven't changed original Vagrantfile.
I thought the directory D:\vagrant\precise32\02-lamp\
would be the place of the VDI-like file but it is not. The working directory serves as the shared folder.
I found the location of the Vagrant box
C:\Users\USER\.vagrant.d\boxes\precise32\0\virtualbox
According to Where is Vagrant saving changes to the VM I found in the VirtualBox GUI the location of the Virtual hard drive file. Which is
C:\Users\USER\VirtualBox VMs\02-lamp_default_1458429875795_57100\
I would like to put this file not in the system drive C:\
but in the data drive which is D:\
.
How to set such vagrant configuration?
For VirtualBox, you can change the location of what is known as the Default Machine Folder through the GUI's Preferences dialog box.
This guide, while a couple of years old, works fine and I followed it last week for how to move an existing vagrant/VirtualBox drive to a new location.
EDIT
I have quoted the steps from the above link/guide, for posterity:
There is an easier way... Go into the VirtualBox Manager GUI click Machine > Add and locate the .vbox you'd like to add back.