I work with Vagrant on POSIX (Mac / Linux), but I managed to find equivalent (?) Windows PowerShell commands. I do not work on Windows, so you will have to test these things yourself.
In the current working directory (I'm just 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
Window:
Get-ChildItem -Force C:\dir\path
I am using 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 believe the type as close as possible)
C:\> type vagrant.env
These variables can then be entered into the environment; Linux:
source vagrant.env
Window:
. .\vagrant.env
After that, run Vagrant; Linux:
vagrant up | tee -ai vagrant-log-info.out
On Windows, Tee-Object can work as follows:
vagrant up | Tee-Object -file vagrant-log-info.out
On Linux, this method will print a log named (something meaningful): vagrant-log-info.out
Then I can read this journal, save it for posterity or something else. Hope this helps.
Please feel free to update this with verified versions of these commands. I can imagine that this is a fairly common need.
todd_dsm
source share