» Debugging

As much as we try to keep Vagrant stable and bug free, it is inevitablethat issues will arise and Vagrant will behave in unexpected ways.

When using these support channels, it is generally helpful to includedebugging logs along with any error reports. These logs can often help youtroubleshoot any problems you may be having.

Scan for sensitive information! Vagrant debug logs include informationabout your system including environment variables and user information. If youstore sensitive information in the environment or in your user account, pleasescan or scrub the debug log of this information before uploading the contents tothe public Internet.

Submit debug logs using GitHub Gist. If you plan on submitting a bugreport or issue that includes debug-level logs, please use a service likeGist. Do not paste the raw debug logs into anissue as it makes it very difficult to scroll and parse the information.

To enable detailed logging, set the VAGRANT_LOG environmental variableto the desired log level name, which is one of debug (loud), info (normal),warn (quiet), and error (very quiet). When asking for support, pleaseset this to debug. When troubleshooting your own issues, you should startwith info, which is much quieter, but contains important informationabout the behavior of Vagrant.

On Linux and Mac systems, this can be done by prepending the vagrantcommand with an environmental variable declaration:

  1. $ VAGRANT_LOG=info vagrant up

On Windows, multiple steps are required:

  1. $ set VAGRANT_LOG=info
  2. $ vagrant up

You can also get the debug level output using the —debug command lineoption. For example:

  1. $ vagrant up --debug

On Linux and Mac, if you are saving the output to a file, you may need to redirect stderr andstdout using &>:

  1. $ vagrant up --debug &> vagrant.log

On Windows in PowerShell (outputs to log and screen):

  1. $ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log"