specifically I'm looking to set up some automated testing on IE8, so I'm using the windows7 IE8 VM from modern.ie: http://aka.ms/vagrant-win7-ie8
I'm able to download the VM and run it on virtualbox, and vagrant will successfully start the VM with GUI, but it is unable to connect via WinRM (it doesn't event try).
Here is my vagrantfile:
Vagrant.configure(2) do |config|
config.vm.define "win7" do |win7|
# http://blog.syntaxc4.net/post/2014/09/03/windows-boxes-for-vagrant-courtesy-of-modern-ie.aspx
win7.vm.box = "vagrant-win7-ie8"
win7.vm.box_url = "http://aka.ms/vagrant-win7-ie8"
# http://stackoverflow.com/questions/23574387/why-is-vagrant-trying-to-ssh-to-windows-guest
# https://www.vagrantup.com/blog/feature-preview-vagrant-1-6-windows.html
win7.vm.communicator = "winrm"
# modern.ie VMs use the following username/password
win7.winrm.username = "IEUser"
win7.winrm.password = "Passw0rd!"
# Set up GUI
win7.vm.provider "virtualbox" do |vb|
vb.gui = true
end
end
end
When I run vagrant up, I get the following output:
Bringing machine 'win7' up with 'virtualbox' provider...
==> win7: Importing base box 'vagrant-win7-ie8'...
==> win7: Matching MAC address for NAT networking...
==> win7: Setting the name of the VM: win7_1424017017058_68086
==> win7: Clearing any previously set network interfaces...
==> win7: Preparing network interfaces based on configuration...
win7: Adapter 1: nat
==> win7: Forwarding ports...
win7: 5985 => 55985 (adapter 1)
win7: 22 => 2222 (adapter 1)
==> win7: Booting VM...
==> win7: Waiting for machine to boot. This may take a few minutes...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Has anyone had luck setting one of these up and having vagrant be able to communicate over WinRM? The box does boot up and is usable from the GUI, I'd just love to have WinRM able to communicate with it. Maybe there are changes that need to be made to the host machine?
Use vagrant version 1.6.5. The latest version has a bug with Windows. I’ve been meaning to fix this but haven’t gotten around to it.
Here are the commands I use to allow vagrant to communicate with the image via winrm (cmd.exe with admin privs):
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”}
sc config WinRM start= auto
And your vagrant file will need the username and password:
config.vm.communicator = “winrm”
config.winrm.username = “IEUser”
config.winrm.password = “Passw0rd!”