gem install vagrant-windows
-Enable WinRM
winrm quickconfig -q
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="512"}
winrm set winrm/config @{MaxTimeoutms="1800000"}
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
-
Create a vagrant user
- For things to work out of the box, username and password should both be vagrant
-
Turn off UAC (Msconfig)
-
Disable complex passwords
- Disable Shutdown Tracker (http://www.jppinto.com/2010/01/how-to-disable-the-shutdown-event-tracker-in-server-20032008/)
- Disable "Server Manager" Starting at login (http://www.elmajdal.net/win2k8/How_to_Turn_Off_The_Automatic_Display_of_Server_Manager_At_logon.aspx)
Add the following to your Vagrantfile
config.vm.guest = :windows
config.vm.forward_port 3389, 3390, :name => "rdp", :auto => true
config.vm.forward_port 5985, 5985, :name => "winrm", :auto => true
Example:
Vagrant::Config.run do |config|
#The following timeout configuration is option, however if have
#any large remote_file resources in your chef recipes, you may
#experience timeouts (reported as 500 responses)
config.winrm.timeout = 1800 #Set WinRM Timeout in seconds (Default 30)
# Configure base box parameters
config.vm.box = "windows2008r2"
config.vm.box_url = "./windows-2008-r2.box"
config.vm.guest = :windows
config.vm.forward_port 3389, 3390, :name => "rdp", :auto => true
config.vm.forward_port 5985, 5985, :name => "winrm", :auto => true
config.vm.provision :chef_solo do |chef|
chef.add_recipe("your::recipe")
end
end
- vagrant up|hault|reload|provision
- Chef Vagrant Provisioner
- Everything Else!!!
- Shell and Puppet Provisioners
- Shell should work, though I have not vetted it yet.
Complex networking setups- Fixed in 0.0.3- Note that I have not tested the Virtual Box 4.0 Driver, all should work. Can someone please confirm?
- Contribute Code (See Below)
- Test Various Scenarios and file bugs for things that dont work
- Fork it.
- Create a branch (git checkout -b my_feature_branch)
- Commit your changes (git commit -am "Added a sweet feature")
- Push to the branch (git push origin my_feature_branch)
- Create a pull requst from your branch into master (Please be sure to provide enough detail for us to cipher what this change is doing)
- Chris McClimans - Vagrant Branch (https://github.com/hh/vagrant/blob/feature/winrm/)
-Dan Wanek - WinRM GEM (https://github.com/zenchild/WinRM)
- +1 For being super responsive to pull requests.