Basic
Usage
- One of the most useful senario with Vagrant is to setup a network of serveral computing nodes to mimic a distributed system. Or even better, use Docker.
Preparation
Download offline file for instable network, esp. in case u r behind the “greatwall”:
Search the box in https://atlas.hashicorp.com/ for box name, version, then follow the format
https://atlas.hashicorp.com/puppetlabs/boxes/<boxName>/versions/<version>/providers/virtualbox.box
to construct the downloading url. e.g. https://atlas.hashicorp.com/puppetlabs/boxes/centos-7.0-64-puppet/versions/1.0.2/providers/virtualbox.box
Change the Storage Location
- Press
Win+R
and typesystempropertiesadvanced
to bring up the “System Properties” dialog, click “Environment Variables…” button, and in the “User vairalbes for $USER” section, add a variable namedVAGRANT_HOME
, whose value isD:\your\vagrant\working\path
.
Or use the command line:
SETX VAGRANT_HOME "D:\your\vagrant\working\path"
- Change VirtualBox storage location: Open Virtalbox and navigate to
File > Preference> General: Default Machine Folder
: change to target location.