Skip to content

Instantly share code, notes, and snippets.

@cescoffier
Last active January 20, 2016 15:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cescoffier/51e6a092257620275f99 to your computer and use it in GitHub Desktop.
Save cescoffier/51e6a092257620275f99 to your computer and use it in GitHub Desktop.
Vagrant file to use with temporary Windows VM and scripts
@echo off
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install -y maven
choco install -y jdk8
choco install -y notepadplusplus.install
choco install -y git.install
choco install -y wget
choco install -y 7zip
choco install -y 7zip.commandline
choco install -y googlechrome
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "vertx/win10"
config.vm.box_url = "http://209.132.178.63/vagrant/Win10.box"
# big timeout since windows boot is very slow
config.vm.boot_timeout = 500
# rdp forward
config.vm.network "forwarded_port", guest: 3389, host: 3389, id: "rdp", auto_correct: true
# winrm config, uses modern.ie default user/password.
config.vm.communicator = "winrm"
config.winrm.username = "IEUser"
config.winrm.password = "Passw0rd!"
config.vm.provider "VirtualBox" do |vb|
# first setup requires gui to be enabled so scripts can be executed in virtualbox guest screen
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", "1024"]
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]
end
end
cd C:\Users\IEUser\Desktop
git clone https://github.com/eclipse/vert.x.git
git clone https://github.com/cescoffier/vertx-examples-it.git
@echo off
REM netsh advfirewall set allprofiles state off
set WINRM_EXEC=call %SYSTEMROOT%\System32\winrm
%WINRM_EXEC% quickconfig -q
%WINRM_EXEC% set winrm/config/winrs @{MaxMemoryPerShellMB="300"}
%WINRM_EXEC% set winrm/config @{MaxTimeoutms="1800000"}
%WINRM_EXEC% set winrm/config/client/auth @{Basic="true"}
%WINRM_EXEC% set winrm/config/service @{AllowUnencrypted="true"}
%WINRM_EXEC% set winrm/config/service/auth @{Basic="true"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment