Last active
October 16, 2016 19:28
-
-
Save brianfgonzalez/30aaeeaa93bb9b943128767f11e56530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
machine_name = "MDT001" | |
gist_url="https://gist.githubusercontent.com/brianfgonzalez/fa0720471ce2f6722d3ced4672e3f47a/raw/9577234599014d73a631fc280fd4899825cd6e33/mdt.ps1" | |
Vagrant.configure("2") do |config| | |
config.vm.box = "brianfgonzalez/winserver12r2" | |
config.vm.box_check_update = false | |
config.vm.network "private_network", ip: "192.168.50.2", virtualbox__intnet: "intnet" | |
config.vm.boot_timeout = 1200 | |
config.vm.hostname = machine_name | |
config.vm.synced_folder "chococache", "/chococache", create: true, | |
mount_options: ["dmode=755,fmode=755"] | |
config.vm.synced_folder "chocopkg", "/chocopkgs", create: true, | |
mount_options: ["dmode=755,fmode=755"] | |
config.vm.provider :virtualbox do |v, override| | |
v.gui = true | |
v.name = machine_name | |
v.memory = "2048" | |
v.cpus = "2" | |
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
v.customize ["modifyvm", :id, "--audio", "none"] | |
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"] | |
v.customize ["modifyvm", :id, "--draganddrop", "hosttoguest"] | |
v.customize ["modifyvm", :id, "--usb", "off"] | |
v.customize ["modifyvm", :id, "--chipset", "ich9"] | |
v.customize ["setextradata", "global", "GUI/SuppressMessages", "all"] | |
#Fixes associated with the time sync with virtualbox | |
v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", "1000"] | |
end | |
# Use this command to list all time zones: tzutil /l | more | |
config.vm.provision "shell", privileged:"true", powershell_elevated_interactive:"true", | |
name: "force timezone set", inline:'tzutil.exe /s "Eastern Standard Time"' | |
config.vm.provision "shell", privileged: "true", powershell_elevated_interactive: "true", | |
name: "gist script download", inline:'iwr -Uri "'+gist_url+'" -OutFile "\tmp\script.ps1"' | |
config.vm.provision "shell", privileged: "true", powershell_elevated_interactive: "true", | |
name: "start gist script", inline:'saps powershell.exe "\tmp\script.ps1" > "\tmp\debug.log" 2>&1' | |
config.vm.post_up_message = "\r\n\r\n\r\n\r\n==================================================="\ | |
"\r\nMDT server is up and running post-configuration tasks.\r\ngist_url: "+gist_url | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment