Where does vagrant store logs?

vagrant log file location
vagrantfile print message
vagrant destroy
vagrant commands
vagrant box add
vagrant documentation
vagrant vm name
vagrant_home

I am trying to do a little debugging as to why my vagrant box is throwing errors when I do vagrant up.

On windows I have:

$ set VAGRANT_LOG=info 
$ vagrant up

Where does vagrant store the log file?


As far as I know vagrant does not write into logfiles, it only has output to stdout.

PS.: I Googled it and found nothing - even in the Vagrant documentations -, so I think I am right.

Where is vagrant's log file?, As much as we try to keep Vagrant stable and bug free, it is inevitable that issues Do not paste the raw debug logs into an issue as it makes it very difficult to  The command VAGRANT_LOG=debug vagrant up --debug prints out plenty of, probably, useful information. Where is this log stored however? Edit: VAGRANT_LOG=debug vagrant up is actually the same as vagrant up --debug. I work on/with: Funtoo-Linux, Vagrant 1.4.3 and VirtualBox 4.3.32.


For Virtual Box provider, the logs are stored at ~/VirtualBox VMs/vagrant_box_name/Logs.

There is a VBox.log and a VBoxStartup.log.

I think @balintant is right too, as these are not 'vagrant' logs, but Virtual Box logs (which is what I was really looking for).

Debugging and Troubleshooting, Enabling this value will cause Vagrant to simply log the plugin source error and can be set to change the directory where Vagrant stores VM-specific state,  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.


I work with Vagrant on a POSIX OS (Mac/Linux) but I was able to find Windows PowerShell equivalent(?) commands. I don't work in Windows so you'll have to test these things yourself.

Within the current working directory (I just happen to be experimenting with CoreOS at the moment):

List the contents of your directory; Linux:

$ ll
...
-rw-rw-r--. 1 myAcct myGroup 3.3K Nov 22 15:33 config.rb
-rw-rw-r--. 1 myAcct myGroup 1.3K Nov 22 16:43 vagrant-info.out
-rw-rw-r--. 1 myAcct myGroup 1.1K Nov 22 16:42 myAcct-data
-rw-rw-r--. 1 myAcct myGroup 4.6K Nov 22 16:05 Vagrantfile
-rw-rw-r--. 1 myAcct myGroup  306 Nov 22 16:47 vagrant.env

Windows:

Get-ChildItem -Force C:\dir\path

I use the vagrant.env file to record/use/reuse experiment-specific environment variables. It looks like this; Linux:

$ cat vagrant.env 
# Environment Variables on a per-experiment basis
# Name a non-default Vagrant Provider:
#export VAGRANT_DEFAULT_PROVIDER='vmware_fusion'
# Which CoreOS channel
export channel='channel=stable'
# Set a log level for troubleshooting: debug or info
export VAGRANT_LOG='info'
#export VAGRANT_DEBUG_LAUNCHER

Windows: (I belive type is as close as you can get)

C:\> type vagrant.env 

These variables can then be introduced into the environment; Linux:

source vagrant.env

Windows:

. .\vagrant.env

After that, start Vagrant; Linux:

vagrant up | tee -ai vagrant-log-info.out

On Windows the Tee-Object might work like this:

vagrant up  | Tee-Object -file vagrant-log-info.out

On Linux, this method will drop a log named (something meaningful): vagrant-log-info.out

I can then read that log, save it for posterity or whatever. I hope this helps.

Please feel free to update this with tested versions of these commands. I can imagine it must be a fairly common need.

Environmental Variables, First I thought I would share that if you do as I have done and miss the part My question is what is the location of the error logs and wordpress  VAGRANT_HOME can be set to change the directory where Vagrant stores global state. By default, this is set to ~/.vagrant.d. The Vagrant home directory is where things such as boxes are stored, so it can actually become quite large on disk.


https://www.vagrantup.com/docs/other/debugging.html says:

unix# VAGRANT_LOG=info vagrant up >vagrant.log
unix# VAGRANT_LOG=info vagrant up | tee vagrant.log

power-shell> vagrant up --debug &> vagrant.log
power-shell> vagrant up --debug | Tee-Object -FilePath ".\vagrant.log"

So there is no specific file location, only STDOUT.

What location of error and php files in Vagrant box? - trellis, vagrant snapshot save [options] [vm-name] <name> -- vm-name is often tee provision.log -- Runs vagrant up , forces provisioning and logs all output to a file  On Windows 10 with Vagrant 2.2.2, setting the environment variable VAGRANT_HOME will ensure that boxes are downloaded to a subfolder of the folder specified for VAGRANT_HOME. In my case I set VAGRANT_HOME to e:\vagrant_home, and the boxes get stored under e:\vagrant_home\boxes. This works for me. That's where the boxes are stored.


Vagrant Cheat Sheet · GitHub, VAGRANT_LOG specifies the verbosity of log messages from Vagrant. By default​, Vagrant does not store any logs. Log messages are very useful when  vagrant@bionic64:~ $ logout Connection to 127.0.0.1 closed. When you are done fiddling around with the machine, run vagrant destroy back on your host machine, and Vagrant will terminate the use of any resources by the virtual machine.


Vagrant: Up and Running: Create and Manage Virtualized Development , (error = #<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. Instead of building a virtual machine from scratch, which would be a slow and tedious process, Vagrant uses a base image to quickly clone a virtual machine. These base images are known as "boxes" in Vagrant, and specifying the box to use for your Vagrant environment is always the first step after creating a new Vagrantfile.


a log of the output from vagrant up · GitHub, You will learn the difference between audit and operational logs, and how ExecStart=/bin/sh -c '/home/vagrant/bin/vault server Then Vault is likely storing its operational logging in the static file located at /var/log/vault.log . Forever, by default, will put logs into a random file in ~/.forever/folder. You should run forever listto see the running processes and their corresponding log file.