2013-09-03 18:08:28 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2013-09-06 16:50:43 +00:00
|
|
|
page_title: "Debugging and Troubleshooting"
|
2013-11-25 00:27:13 +00:00
|
|
|
sidebar_current: "other-debugging"
|
2016-01-19 18:08:53 +00:00
|
|
|
description: |-
|
|
|
|
As much as we try to keep Vagrant stable and bug free, it is inevitable
|
|
|
|
that issues will arise and Vagrant will behave in unexpected ways. In
|
|
|
|
these cases, Vagrant has amazing support channels available to assist you.
|
2013-09-03 18:08:28 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Debugging
|
|
|
|
|
|
|
|
As much as we try to keep Vagrant stable and bug free, it is inevitable
|
2017-03-28 01:19:52 +00:00
|
|
|
that issues will arise and Vagrant will behave in unexpected ways.
|
2013-09-03 18:08:28 +00:00
|
|
|
|
|
|
|
When using these support channels, it is generally helpful to include
|
|
|
|
debugging logs along with any error reports. These logs can often help you
|
|
|
|
troubleshoot any problems you may be having.
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
!> **Scan for sensitive information!** Vagrant debug logs include information
|
|
|
|
about your system including environment variables and user information. If you
|
|
|
|
store sensitive information in the environment or in your user account, please
|
|
|
|
scan or scrub the debug log of this information before uploading the contents to
|
|
|
|
the public Internet.
|
|
|
|
|
|
|
|
~> **Submit debug logs using GitHub Gist.** If you plan on submitting a bug
|
|
|
|
report or issue that includes debug-level logs, please use a service like
|
|
|
|
[Gist](https://gist.github.com). **Do not** paste the raw debug logs into an
|
|
|
|
issue as it makes it very difficult to scroll and parse the information.
|
|
|
|
|
2013-09-03 18:08:28 +00:00
|
|
|
To enable detailed logging, set the `VAGRANT_LOG` environmental variable
|
|
|
|
to the desired log level name, which is one of `debug` (loud), `info` (normal),
|
|
|
|
`warn` (quiet), and `error` (very quiet). When asking for support, please
|
|
|
|
set this to `debug`. When troubleshooting your own issues, you should start
|
|
|
|
with `info`, which is much quieter, but contains important information
|
|
|
|
about the behavior of Vagrant.
|
|
|
|
|
|
|
|
On Linux and Mac systems, this can be done by prepending the `vagrant`
|
|
|
|
command with an environmental variable declaration:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ VAGRANT_LOG=info vagrant up
|
|
|
|
```
|
|
|
|
|
|
|
|
On Windows, multiple steps are required:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ set VAGRANT_LOG=info
|
|
|
|
$ vagrant up
|
|
|
|
```
|
|
|
|
|
2013-11-01 01:12:34 +00:00
|
|
|
You can also get the debug level output using the `--debug` command line
|
|
|
|
option. For example:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ vagrant up --debug
|
|
|
|
```
|
2016-02-06 03:47:07 +00:00
|
|
|
|
2016-12-20 19:01:08 +00:00
|
|
|
On Linux and Mac, if you are saving the output to a file, you may need to redirect stderr and
|
2016-02-07 17:59:17 +00:00
|
|
|
stdout using `&>`:
|
2016-02-06 03:47:07 +00:00
|
|
|
|
|
|
|
```
|
2016-02-07 17:59:17 +00:00
|
|
|
$ vagrant up --debug &> vagrant.log
|
|
|
|
```
|
2016-12-20 19:01:08 +00:00
|
|
|
|
2018-01-02 09:38:08 +00:00
|
|
|
On Windows in PowerShell (outputs to log and screen):
|
2018-01-12 23:38:29 +00:00
|
|
|
|
2016-12-20 19:01:08 +00:00
|
|
|
```
|
2018-01-02 09:38:08 +00:00
|
|
|
$ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log"
|
2016-12-20 19:01:08 +00:00
|
|
|
```
|