If you are trying to reproduce this exactly, I'm using the following environment:
- VirtualBox 4.3.12
- Bills Kitchen 3.0-rc4 (includes Vagrant, Packer, Chef, etc)
First challenge is to get a windows basebox from somewhere. I couldn't find a good one, so built one myself from the windows/boxcutter packer templates:
git clone https://github.com/boxcutter/windows.git windows-boxes
cd windows-boxes
make virtualbox/eval-win7x86-enterprise
This takes a while (~45 minutes, depending on your internet connection).
Once the basebox is built, you can import it to Vagrant:
vagrant box add boxcutter/eval-win7x86-enterprise box/virtualbox/eval-win7x86-enterprise-nocm-1.0.4.box
Next I was trying to figure out a minimal Vagrantfile example, which works for all the basic Vagrant things, e.g.:
vagrant upshould not work reliably (not hang / run into timeouts)vagrant sshshould workvagrant ssh -c "echo foo"should run the commandvagrant provisionshould work, with eitherinline:orpath:(.bat / .ps) "shell" provisioner- synced folders should work (via vboxsf or smb ideally)
The Vagrantfile that is packaged within the above built basebox already includes some windows specific settings, such as setting config.vm.communicator = "winrm" and config.vm.guest = :windows, so we don't need to repeat that in our Vagrantfile.
So this was my first try:
Vagrant.configure(2) do |config|
config.vm.box = "boxcutter/eval-win7x86-enterprise-nocm"
config.vm.provision "shell", inline: "echo hello!"
config.vm.synced_folder ".", "/vagrant", disabled: true
endNo luck though...
vagrant upworks, but hangs and never completes (I can Ctrl+C though and continue working with the VM)vagrant sshworks, yay! :-)vagrant ssh -c "echo foo"drops me into the shell instead of executing the commandvagrant provisionhangs and times out- synced folders I explicitly disabled for now to make it even simpler
Trying this WinRM troubleshooting guide:
https://github.com/WinRb/WinRM#troubleshooting
I'm now running into an error with the network adapter (says "winrm firewall exception will not work since the network connection type on this machine is set to public" and I should change it to either "domain" or "private"...)
darn I need the guest additions so I can copy/paste...