# -*- mode: ruby -*- # vi: set ft=ruby : # Base box: https://github.com/akrabat/packer-templates Vagrant.configure("2") do |config| config.vm.box = "19ft/windows2016" config.vm.guest = :windows config.vm.boot_timeout = 600 config.vm.hostname = "WinDev" config.vm.network "private_network", ip: "192.168.99.201" config.vm.communicator = "winrm" config.vm.provider "VirtualBox" do |vb| # Display the VirtualBox GUI when booting the machine vb.gui = true # Customize the amount of memory on the VM: vb.memory = "2048" vb.cpus = 2 end config.vm.provision "shell", privileged: "true", inline: <<-'POWERSHELL' Set-TimeZone "Coordinated Universal Time" # Install Boxstarter . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force # Copy setup.ps1 to the Temp directory and then run boxstarter with our setup.ps1 script $env:PSModulePath = "$([System.Environment]::GetEnvironmentVariable('PSModulePath', 'User'));$([System.Environment]::GetEnvironmentVariable('PSModulePath', 'Machine'))" cp C:\vagrant\setup.ps1 $env:TEMP Import-Module Boxstarter.Chocolatey $credential = New-Object System.Management.Automation.PSCredential("vagrant", (ConvertTo-SecureString "vagrant" -AsPlainText -Force)) Install-BoxstarterPackage $env:TEMP\setup.ps1 -Credential $credential POWERSHELL end