Vagrantfile 1.94 KB
Newer Older
Stefan Scherer's avatar
Stefan Scherer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "windows_10"
  config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true

  config.vm.communicator = "winrm"

  config.winrm.username = "vagrant"
  config.winrm.password = "vagrant"

  config.vm.guest = :windows
  config.windows.halt_timeout = 15

  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.synced_folder "..", "/vagrant"

  config.vm.define "hyperv" do |cfg|
Stefan Scherer's avatar
Stefan Scherer committed
22 23 24 25
    cfg.vm.provision "shell", path: "scripts/install-hyperv.ps1", privileged: false
    cfg.vm.provision "reload"
    cfg.vm.provision "shell", path: "scripts/copy-templates.ps1", privileged: false
    cfg.vm.provision "shell", path: "scripts/install-tools.ps1", privileged: false
Stefan Scherer's avatar
Stefan Scherer committed
26 27 28
  end

  config.vm.define "virtualbox" do |cfg|
Stefan Scherer's avatar
Stefan Scherer committed
29 30 31 32
    cfg.vm.provision "shell", path: "scripts/copy-templates.ps1", privileged: false
    cfg.vm.provision "shell", path: "scripts/install-tools.ps1", privileged: false
    cfg.vm.provision "shell", path: "scripts/install-virtualbox.ps1", privileged: false
    cfg.vm.provision "reload"
Stefan Scherer's avatar
Stefan Scherer committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
  end

  ["vmware_fusion", "vmware_workstation"].each do |provider|
    config.vm.provider provider do |v, override|
      v.gui = true
      v.enable_vmrun_ip_lookup = false
      v.vmx["memsize"] = "6048"
      v.vmx["numvcpus"] = "2"
      v.vmx["vhv.enable"] = "TRUE"
    end
  end

  config.vm.provider "vmware_fusion" do |v|
    v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
    v.vmx["mks.enable3d"] = "TRUE"
    v.vmx["mks.forceDiscreteGPU"] = "TRUE"
    v.vmx["gui.fullscreenatpoweron"] = "TRUE"
    v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
    v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
    v.vmx["sound.startconnected"] = "TRUE"
    v.vmx["sound.present"] = "TRUE"
    v.vmx["sound.autodetect"] = "TRUE"
  end
end