- » Environmental Variables
- » CFLAGS
- » CPPFLAGS
- » CURL_CA_BUNDLE
- » LDFLAGS
- » SSL_CERT_FILE
- » VAGRANT_ALIAS_FILE
- » VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS
- » VAGRANT_BOX_UPDATE_CHECK_DISABLE
- » VAGRANT_CHECKPOINT_DISABLE
- » VAGRANT_CWD
- » VAGRANT_DEBUG_LAUNCHER
- » VAGRANT_DEFAULT_PROVIDER
- » VAGRANT_DEFAULT_TEMPLATE
- » VAGRANT_DETECTED_ARCH
- » VAGRANT_DETECTED_OS
- » VAGRANT_DISABLE_RESOLV_REPLACE
- » VAGRANT_DISABLE_VBOXSYMLINKCREATE
- » VAGRANT_DOTFILE_PATH
- » VAGRANT_ENABLE_RESOLV_REPLACE
- » VAGRANT_FORCE_COLOR
- » VAGRANT_HOME
- » VAGRANT_IGNORE_WINRM_PLUGIN
- » VAGRANT_INSTALL_LOCAL_PLUGINS
- » VAGRANT_IS_HYPERV_ADMIN
- » VAGRANT_LOCAL_PLUGINS_LOAD
- » VAGRANT_LOG
- » VAGRANT_NO_COLOR
- » VAGRANT_NO_PARALLEL
- » VAGRANT_NO_PLUGINS
- » VAGRANT_POWERSHELL_VERSION_DETECTION_TIMEOUT
- » VAGRANT_PREFERRED_PROVIDERS
- » VAGRANT_PREFER_SYSTEM_BIN
- » VAGRANT_SKIP_SUBPROCESS_JAILBREAK
- » VAGRANT_USER_AGENT_PROVISIONAL_STRING
- » VAGRANT_USE_VAGRANT_TRIGGERS
- » VAGRANT_VAGRANTFILE
- » VAGRANT_WINPTY_DISABLE
» Environmental Variables
Vagrant has a set of environmental variables that can be used toconfigure and control it in a global way. This page lists those environmentalvariables.
» CFLAGS
If set the contents of this environment variable will be appended to thevalue generated by the Vagrant launcher.
» CPPFLAGS
If set the contents of this environment variable will be appended to thevalue generated by the Vagrant launcher.
» CURL_CA_BUNDLE
If set this environment variable will be passed through to the Vagrantprocess. By default Vagrant will use the CA certificate included withthe Vagrant installation.
» LDFLAGS
If set the contents of this environment variable will be appended to thevalue generated by the Vagrant launcher.
» SSL_CERT_FILE
If set this environment variable will be passed through to the Vagrantprocess. By default Vagrant will use the CA certificate included withthe Vagrant installation.
» VAGRANT_ALIAS_FILE
VAGRANT_ALIAS_FILE
can be set to change the file where Vagrant aliases aredefined. By default, this is set to ~/.vagrant.d/aliases
.
» VAGRANT_ALLOW_PLUGIN_SOURCE_ERRORS
If this is set to any value, then Vagrant will not error when a configuredplugin source is unavailable. When installing a Vagrant plugin Vagrantwill error and halt if a plugin source is inaccessible. In some cases itmay be desirable to ignore inaccessible sources and continue with theplugin installation. Enabling this value will cause Vagrant to simply logthe plugin source error and continue.
» VAGRANT_BOX_UPDATE_CHECK_DISABLE
By default, Vagrant will query the metadata API server to see if a newerbox version is available for download. This optional can be disabled on aper-Vagrantfile basis with config.vm.box_check_update
, but it can also bedisabled globally setting VAGRANT_BOX_UPDATE_CHECK_DISABLE
to any non-emptyvalue.
This option will not affect global box functions like vagrant box update
.
» VAGRANT_CHECKPOINT_DISABLE
Vagrant does occasional network calls to check whether the version of Vagrantthat is running locally is up to date. We understand that software making remotecalls over the internet for any reason can be undesirable. To suppress thesecalls, set the environment variable VAGRANT_CHECKPOINT_DISABLE
to anynon-empty value.
If you use other HashiCorp tools like Packer and would prefer to configure thissetting only once, you can set CHECKPOINT_DISABLE
instead.
» VAGRANT_CWD
VAGRANT_CWD
can be set to change the working directory of Vagrant. Bydefault, Vagrant uses the current directory you are in. The working directoryis important because it is where Vagrant looks for the Vagrantfile. Italso defines how relative paths in the Vagrantfile are expanded, since they'reexpanded relative to where the Vagrantfile is found.
This environmental variable is most commonly set when running Vagrant froma scripting environment in order to set the directory that Vagrant sees.
» VAGRANT_DEBUG_LAUNCHER
For performance reasons, especially for Windows users, Vagrant uses a staticbinary to launch the actual Vagrant process. If you have very early issueswhen launching Vagrant from the official installer, you can specify theVAGRANT_DEBUG_LAUNCHER
environment variable to output debugging informationabout the launch process.
» VAGRANT_DEFAULT_PROVIDER
This configures the default provider Vagrant will use.
This normally does not need to be set since Vagrant is fairly intelligentabout how to detect the default provider. By setting this, you will forceVagrant to use this provider for any new Vagrant environments. ExistingVagrant environments will continue to use the provider they came up
with.Once you vagrant destroy
existing environments, this will take effect.
» VAGRANT_DEFAULT_TEMPLATE
This configures the template used by vagrant init
when the —template
optionis not provided.
» VAGRANT_DETECTED_ARCH
This environment variable may be set by the Vagrant launcher to help determinethe current runtime architecture in use. In general Vagrant will set this valuewhen running on a Windows host using a cygwin or msys based shell. The valuethe Vagrant launcher may set in this environment variable will not always matchthe actual architecture of the platform itself. Instead it signifies the detectedarchitecture of the environment it is running within. If this value is set, theVagrant launcher will not modify it.
» VAGRANT_DETECTED_OS
This environment variable may be set by the Vagrant launcher to help determinethe current runtime platform. In general Vagrant will set this value when runningon a Windows host using a cygwin or msys based shell. If this value is set, theVagrant launcher will not modify it.
» VAGRANT_DISABLE_RESOLV_REPLACE
Vagrant can optionally use the Ruby Resolv library in place of the libc resolver.This can be disabled setting this environment variable.
» VAGRANT_DISABLE_VBOXSYMLINKCREATE
If set, this will completely disable the ability to create symlinks with all VirtualBoxshared folders. If this environment variable is not set, the VirtualBox syncedfolders option SharedFoldersEnableSymlinksCreate
will be enabled by default.This option can be overridden on a per-folder basis within your Vagrantfileconfig by setting the SharedFoldersEnableSymlinksCreate
option to true if youdo not wish to completely disable this feature for all VirtualBox guests.
More information on the option can be read in the VirtualBox synced folders docs page.
» VAGRANT_DOTFILE_PATH
VAGRANT_DOTFILE_PATH
can be set to change the directory where Vagrant storesVM-specific state, such as the VirtualBox VM UUID. By default, this is set to.vagrant
. If you keep your Vagrantfile in a Dropbox folder in order to sharethe folder between your desktop and laptop (for example), Vagrant will overwritethe files in this directory with the details of the VM on the most recently-usedhost. To avoid this, you could set VAGRANT_DOTFILE_PATH
to .vagrant-laptop
and .vagrant-desktop
on the respective machines. (Remember to update your.gitignore
!)
» VAGRANT_ENABLE_RESOLV_REPLACE
Use the Ruby Resolv library in place of the libc resolver.
» VAGRANT_FORCE_COLOR
If this is set to any value, then Vagrant will force colored output, evenif it detected that there is no TTY or the current environment does notsupport it.
The equivalent behavior can be achieved by using the —color
flag on acommand-by-command basis. This environmental variable is useful for settingthis flag globally.
» VAGRANT_HOME
VAGRANT_HOME
can be set to change the directory where Vagrant storesglobal state. By default, this is set to ~/.vagrant.d
. The Vagrant homedirectory is where things such as boxes are stored, so it can actually becomequite large on disk.
» VAGRANT_IGNORE_WINRM_PLUGIN
Vagrant will not display warning when vagrant-winrm
plugin is installed.
» VAGRANT_INSTALL_LOCAL_PLUGINS
If this is set to any value, Vagrant will not prompt for confirmationprior to installing local plugins which have been defined within thelocal Vagrantfile.
» VAGRANT_IS_HYPERV_ADMIN
Disable Vagrant's check for Hyper-V admin privileges and allow Vagrant to assumethe current user has full access to Hyper-V. This is useful if the internalprivilege check incorrectly determines the current user does not have accessto Hyper-V.
» VAGRANT_LOCAL_PLUGINS_LOAD
If this is set Vagrant will not stub the Vagrantfile when runningvagrant plugin
commands. When this environment variable is set the—local
flag will not be required by vagrant plugin
commands toenable local project plugins.
» VAGRANT_LOG
VAGRANT_LOG
specifies the verbosity of log messages from Vagrant.By default, Vagrant does not actively show any log messages.
Log messages are very useful when troubleshooting issues, reportingbugs, or getting support. At the most verbose level, Vagrant outputsbasically everything it is doing.
Available log levels are "debug," "info," "warn," and "error." Both"warn" and "error" are practically useless since there are very fewcases of these, and Vagrant generally reports them within the normaloutput.
"info" is a good level to start with if you are having problems, becausewhile it is much louder than normal output, it is still very human-readableand can help identify certain issues.
"debug" output is extremely verbose and can be difficult to read withoutsome knowledge of Vagrant internals. It is the best output to attach toa support request or bug report, however.
» VAGRANT_NO_COLOR
If this is set to any value, then Vagrant will not use any colorizedoutput. This is useful if you are logging the output to a file oron a system that does not support colors.
The equivalent behavior can be achieved by using the —no-color
flagon a command-by-command basis. This environmental variable is usefulfor setting this flag globally.
» VAGRANT_NO_PARALLEL
If this is set, Vagrant will not perform any parallel operations (such asparallel box provisioning). All operations will be performed in serial.
» VAGRANT_NO_PLUGINS
If this is set to any value, then Vagrant will not load any 3rd partyplugins. This is useful if you install a plugin and it is introducinginstability to Vagrant, or if you want a specific Vagrant environment tonot load plugins.
Note that any vagrant plugin
commands automatically do not load anyplugins, so if you do install any unstable plugins, you can always usethe vagrant plugin
commands without having to worry.
» VAGRANT_POWERSHELL_VERSION_DETECTION_TIMEOUT
Vagrant will use a default timeout when checking for the installed versionof PowerShell. Occasionally the default can be too low and Vagrant will reportbeing unable to detect the installed version of PowerShell. This environmentvariable can be used to extend the timeout used during PowerShell versiondetection.
When setting this environment variable, its value will be in seconds. By default,it will use 30 seconds as a timeout.
» VAGRANT_PREFERRED_PROVIDERS
This configures providers that Vagrant should prefer.
Much like the VAGRANTDEFAULT_PROVIDER
this environment variable normallydoes not need to be set. By setting this you will instruct Vagrant to_prefer providers defined in this environment variable for any _new_Vagrant environments. Existing Vagrant environments will continue to usethe provider they came up
with. Once you vagrant destroy
existing environments,this will take effect. A single provider can be defined within this environmentvariable or a comma delimited list of providers.
» VAGRANT_PREFER_SYSTEM_BIN
If this is set, Vagrant will prefer using utility executables (like ssh
and rsync
)from the local system instead of those vendored within the Vagrant installation.
Vagrant will default to using a system provided ssh
on Windows. Thisenvironment variable can also be used to disable that behavior to force Vagrant touse the embedded ssh
executable by setting it to 0
.
» VAGRANT_SKIP_SUBPROCESS_JAILBREAK
As of Vagrant 1.7.3, Vagrant tries to intelligently detect if it is running inthe installer or running via Bundler. Although not officially supported, Vagranttries its best to work when executed via Bundler. When Vagrant detects that youhave spawned a subprocess that lives outside of Vagrant's installer, Vagrantwill do its best to reset the preserved environment during the subprocessexecution.
If Vagrant detects it is running outside of the officially installer, theoriginal environment will always be restored. You can disable this automaticjailbreak by setting VAGRANT_SKIP_SUBPROCESS_JAILBREAK
.
» VAGRANT_USER_AGENT_PROVISIONAL_STRING
Vagrant will append the contents of this variable to the default user agent header.
» VAGRANT_USE_VAGRANT_TRIGGERS
Vagrant will not display the warning about disabling the core trigger feature ifthe community plugin is installed.
» VAGRANT_VAGRANTFILE
This specifies the filename of the Vagrantfile that Vagrant searches for.By default, this is "Vagrantfile". Note that this is not a file path,but just a filename.
This environmental variable is commonly used in scripting environmentswhere a single folder may contain multiple Vagrantfiles representingdifferent configurations.
» VAGRANT_WINPTY_DISABLE
If this is set, Vagrant will not wrap interactive processes with winpty whererequired.