Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release-1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
joefitzgerald committed Feb 26, 2014
2 parents fa4eb57 + ffc8ad8 commit c74aab2
Show file tree
Hide file tree
Showing 14 changed files with 1,194 additions and 13 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## v1.7 (February 26, 2014)

* Add support for Windows 7 Enterprise
* Add support for Windows 2008 R2 Core
* Add support for Windows 2012 R2 Core
* Remove port forwarding from Vagrantfile templates
* Update Puppet version in scripts/puppet.bat

## v1.6 (January 20, 2014

* Remove `config.vm.base_mac = "{{ .BaseMacAddress }}"` from vagrantfile templates, ensure SCSI controller is set in VMX (fixes #26)
Expand Down
310 changes: 310 additions & 0 deletions answer_files/2008_r2_core/Autounattend.xml

Large diffs are not rendered by default.

289 changes: 289 additions & 0 deletions answer_files/2012_r2_core/Autounattend.xml

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions answer_files/7/Autounattend.xml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions scripts/dis-updates.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<#
.SYNOPSIS
Disables automatic windows updates
.DESCRIPTION
Disables checking for and applying Windows Updates (does not prevent updates from being applied manually or being pushed down)
Run on the machine that updates need disabling on.
.PARAMETER <paramName>
None
.EXAMPLE
./Disable-WindowsUpdates.ps1
#>
$RunningAsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if ($RunningAsAdmin)
{

$Updates = (New-Object -ComObject "Microsoft.Update.AutoUpdate").Settings

if ($Updates.ReadOnly -eq $True) { Write-Error "Cannot update Windows Update settings due to GPO restrictions." }

else {
$Updates.NotificationLevel = 1 #Disabled
$Updates.Save()
$Updates.Refresh()
Write-Output "Automatic Windows Updates disabled."
}
}

else
{ Write-Warning "Must be executed in Administrator level shell."
Write-Warning "Script Cancelled!" }
2 changes: 1 addition & 1 deletion scripts/puppet.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if not exist "C:\Windows\Temp\puppet.msi" (
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.puppetlabs.com/windows/puppet-3.3.0.msi', 'C:\Windows\Temp\puppet.msi')" <NUL
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://downloads.puppetlabs.com/windows/puppet-3.4.3.msi', 'C:\Windows\Temp\puppet.msi')" <NUL
)

:: http://docs.puppetlabs.com/pe/latest/install_windows.html
Expand Down
1 change: 1 addition & 0 deletions scripts/win-updates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function Install-WindowsUpdates() {
Write-Host 'No updates available to install...'
$global:MoreUpdates=0
$global:RestartRequired=0
Set-Service -Name $script:ServiceName -StartupType Automatic -Status Running
break
}

Expand Down
4 changes: 0 additions & 4 deletions vagrantfile-windows_2008_r2.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ Vagrant.configure("2") do |config|
config.vm.guest = :windows
config.windows.halt_timeout = 15

# Port forward WinRM and RDP
config.vm.network :forwarded_port, guest: 3389, host: 3389
config.vm.network :forwarded_port, guest: 5985, host: 5985

# Berkshelf
# config.berkshelf.enabled = true

Expand Down
4 changes: 0 additions & 4 deletions vagrantfile-windows_2012.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ Vagrant.configure("2") do |config|
config.vm.guest = :windows
config.windows.halt_timeout = 15

# Port forward WinRM and RDP
config.vm.network :forwarded_port, guest: 3389, host: 3389
config.vm.network :forwarded_port, guest: 5985, host: 5985

# Berkshelf
# config.berkshelf.enabled = true

Expand Down
4 changes: 0 additions & 4 deletions vagrantfile-windows_2012_r2.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ Vagrant.configure("2") do |config|
config.vm.guest = :windows
config.windows.halt_timeout = 15

# Port forward WinRM and RDP
config.vm.network :forwarded_port, guest: 3389, host: 3389
config.vm.network :forwarded_port, guest: 5985, host: 5985

# Berkshelf
# config.berkshelf.enabled = true

Expand Down
45 changes: 45 additions & 0 deletions vagrantfile-windows_7.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows-7"
config.vm.box = "windows_7"

# You should be using the vagrant-windows Vagrant Plugin!
# Admin user name and password
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"

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

# Berkshelf
# config.berkshelf.enabled = true

# Shell - Hello World
# config.vm.provision :shell, :inline => "C:\\vagrant\\scripts\\HelloWorld.bat"

config.vm.provider :virtualbox do |v, override|
#v.gui = true
v.customize ["modifyvm", :id, "--memory", 2048]
v.customize ["modifyvm", :id, "--cpus", 2]
end

config.vm.provider :vmware_fusion do |v, override|
#v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
end

config.vm.provider :vmware_workstation do |v, override|
#v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
end
end
72 changes: 72 additions & 0 deletions windows_2008_r2_core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"builders": [{
"type": "vmware-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows7srv-64",
"tools_upload_flavor": "windows",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"./answer_files/2008_r2_core/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
}
}, {
"type": "virtualbox-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2008_64",
"disk_size": 61440,
"floppy_files": [
"./answer_files/2008_r2_core/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1",
"./scripts/oracle-cert.cer"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
]
}],
"provisioners": [{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat"
]
}, {
"type": "shell", "inline": ["rm -rf /tmp/*"]
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2008_r2_core_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2008_r2.template"
}]
}
80 changes: 80 additions & 0 deletions windows_2012_r2_core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"builders": [
{
"type": "vmware-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EVAL_EN-US-IRM_SSS_X64FREE_EN-US_DV5.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "458ff91f8abc21b75cb544744bf92e6a",
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows8srv-64",
"tools_upload_flavor": "windows",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"./answer_files/2012_r2_core/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
}
},
{
"type": "virtualbox-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVER_EVAL_EN-US-IRM_SSS_X64FREE_EN-US_DV5.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "458ff91f8abc21b75cb544744bf92e6a",
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
"disk_size": 61440,
"floppy_files": [
"./answer_files/2012_r2_core/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1",
"./scripts/oracle-cert.cer"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
]
}
],
"provisioners": [
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat"
]
},
{
"type": "shell", "inline": ["rm -rf /tmp/*"]
}
],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2012_r2_core_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2012_r2.template"
}
]
}
82 changes: 82 additions & 0 deletions windows_7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"builders": [
{
"type": "vmware-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "1d0d239a252cb53e466d39e752b17c28",
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "4h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows7-64",
"tools_upload_flavor": "windows",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"./answer_files/7/Autounattend.xml",
"./scripts/dis-updates.ps1",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
}
},
{
"type": "virtualbox-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "1d0d239a252cb53e466d39e752b17c28",
"headless": false,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "4h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows7_64",
"disk_size": 61440,
"floppy_files": [
"./answer_files/7/Autounattend.xml",
"./scripts/dis-updates.ps1",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1",
"./scripts/oracle-cert.cer"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
]
}
],
"provisioners": [
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat"
]
},
{
"type": "shell", "inline": ["rm -rf /tmp/*"]
}
],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_7_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_7.template"
}
]
}

0 comments on commit c74aab2

Please sign in to comment.