Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Vagrant >=1.6 Windows Instructions

How to set up a Windows VM with Vagrant

Create your VM


  1. Obtain a windows vm from Modern IE.
  • Win 8 OSX
curl -O -L "{1.sfx,2.rar,3.rar,4.rar,5.rar}"
  • Win 8 Linux
wget -i
  • Extract the .ova file by doing
chmod +x IE10.Win8.For.MacVirtualBox.part1.sfx
  1. Obtain VirtualBox from Oracle VirtualBox.
  2. Import the *.ova or whatever it was you downloaded for your platform into VirtualBox.
  3. Install VirtualBox Windows Guest Tools from inside of the VM.

NOTE: You don't have to use the VMs from Modern IE's site, if you have a windows iso you can make the initial vm yourself. Follow any VirtualBox Tutorial for more info on that if needed. see VirtualBox website

Package for Vagrant


  1. Launch the box, create a new user called vagrant with password vagrant. Put this user in the Administrators group.
  2. Turn on WinRM:
  • start an command line with Administrator privs.
  • now run these commands in order:
 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
  1. Stop the VM and in a terminal run the vagrant packaging commands:
vagrant package --base NameOfTheVMInVirtualBox --output

Example Vagrantfile


# -*- mode: ruby -*-
# vi: set ft=ruby :


Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Windows Guest Specific = "Win81"
  config.vm.box_url = "./"
  config.vm.guest = :windows

  # port forwarding for RDP and WinRM "forwarded_port", guest: 3389, host: 3389 "forwarded_port", guest: 5985, host: 5985, id: "winrm", auto_correct: true

  # WinRM Settings
  config.vm.communicator = "winrm" = true "private_network", ip: "" "public_network"

  # If true, then any SSH connections made will enable agent forwarding.
  # Default value: false
  config.ssh.forward_agent = true

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  config.vm.synced_folder "../data", "/vagrant_data"

  config.vm.provider :virtualbox do |vb|
     # Boot with headless mode
     vb.gui = true
     # Using VBoxManage to set natdnshostresolver (to fix Cisco VPN issues)
     vb.customize ["modifyvm", :id, "--memory", "4096"]
     vb.customize ["modifyvm", :id, "--vram", "128"]
     vb.customize ["modifyvm", :id, "--cpus", "2"]
     vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
     vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]

  config.vm.boot_timeout = 500


This comment has been minimized.

Copy link

@IanShoe IanShoe commented Apr 16, 2015

make "IE10.Win8.For.MacVirtualBox.part1.sfx" executable
chmod +x IE10.Win8.For.MacVirtualBox.part1.sfx



This comment has been minimized.

Copy link

@channon1 channon1 commented Jul 28, 2015

If can not extract on Linux (Debian 8.1)

dpkg --add-architecture i386
apt-get update
aptitude install libc6:i386 libstdc++6:i386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment