wintriallab/vagrant/FreyjaA/Vagrantfile

54 lines
2.0 KiB
Ruby
Raw Normal View History

2015-11-25 21:56:41 +00:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
require "date"
Vagrant.require_version ">= 1.6.2"
# Resolve paths before passing them to config.vm.provision
# I do this because, when run from my buildlab.ps1 script, I set ENV:VAGRANT_CWD to this directory,
# but pushd away into a working directory on a bigger disk for actually keeping the VM
thisVagrantfileDir = File.dirname(__FILE__)
commonScriptsDir = "#{thisVagrantfileDir}/../../scripts"
2015-11-25 21:56:41 +00:00
Vagrant.configure("2") do |config|
2016-03-15 16:41:52 +00:00
#config.vm.define "FreyjaA " + DateTime.now.strftime("%Y-%m-%d-%H-%M-%S")
config.vm.define "FreyjaA-2016-01-08"
#config.vm.box = "wintriallab-windows_10_x86"
config.vm.box = "wintriallab-windows_81_x86"
2015-11-25 21:56:41 +00:00
config.vm.communicator = "winrm"
# Admin user name and password
config.winrm.username = "vagrant"
config.winrm.password = "V@grant123"
config.vm.guest = :windows
config.windows.halt_timeout = 15
#config.vm.network :forwarded_port, guest: 3389, host: 33891, id: "rdp", auto_correct: true
2016-03-15 16:44:06 +00:00
config.vm.network :public_network
2015-11-25 21:56:41 +00:00
config.vm.provider :virtualbox do |v, override|
#v.gui = true
2016-03-15 16:44:06 +00:00
v.customize ["modifyvm", :id, "--memory", 3072]
2015-11-25 21:56:41 +00:00
v.customize ["modifyvm", :id, "--cpus", 1]
v.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
v.customize ["modifyvm", :id, "--accelerate2dvideo", "on"]
v.customize ["modifyvm", :id, "--vram", 128]
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
v.customize ["modifyvm", :id, "--draganddrop", "bidirectional"]
end
2016-03-15 16:41:52 +00:00
begin
Dir.mkdir('./synced')
rescue
puts "./synced is already created I guess idk"
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "./synced", "/vagrant", create: true
FileUtils.cp "#{commonScriptsDir}/wintriallab-postinstall.psm1", "./synced/wintriallab-postinstall.psm1"
FileUtils.cp "./provision-dlpvpns.ps1", "./synced/provision-dlpvpns.ps1"
config.vm.provision "shell", inline: "C:/vagrant/provision-dlpvpns.ps1"
2015-11-25 21:56:41 +00:00
end