Commit 3cfa7508 authored by Joe Fitzgerald's avatar Joe Fitzgerald

Windows 2012 R2 Support, Switching All ISOs To Publicly Accessible Trials

parent 06ec7aaf
......@@ -6,11 +6,26 @@ This repository contains Windows templates that can be used to create boxes for
This repo began by borrowing bits from the VeeWee Windows templates (https://github.com/jedi4ever/veewee/tree/master/templates). Modifications were made to work with Packer and the VMware Fusion provider for Packer and Vagrant.
### Windows Updates
The scripts in this repo will install all Windows updates – by default – during Windows Setup. This is a _very_ time consuming process, depending on the age of the OS and the quantity of updates released since the last service pack. You might want to do yourself a favor during development and disable this functionality, by commenting out this First Logon Command:
```
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1</CommandLine>
<Description>Install Windows Updates</Description>
<Order>100</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
```
Doing so will give you hours back in your day, which is a good thing.
### Getting Started
This repository assumes that you have access to [MSDN](http://msdn.microsoft.com) and can download the ISO images Microsoft makes available there.
Currently, this repo expects you to do a little heavy lifting to get the Windows ISO required to build boxes.
Currently, this repo leverages trial versions of Windows 2008 R2 / 2012 / 2012 R2. If you would like to leverage RTM (non-trial) versions, you should update the relevent `.json` file, setting `iso_url` to `"./iso/<path to your iso>.iso"` and `iso_checksum` to `<the md5 of your iso>` after following these instructions:
1. Download the Windows Server 2008 R2 with Service Pack 1 (x64) - DVD (English) ISO (`en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso`)
2. Verify that `en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso` has an MD5 hash of `8dcde01d0da526100869e2457aafb7ca` (Microsoft lists a SHA1 hash of `d3fd7bf85ee1d5bdd72de5b2c69a7b470733cd0a`, which is equivalent)
......@@ -21,4 +36,4 @@ Currently, this repo expects you to do a little heavy lifting to get the Windows
### Contributing
Pull requests welcomed. I plan to include other variants of Windows 2008 R2 and Windows 2012 next.
Pull requests welcomed. Please ensure you create your edits in a branch off of the `develop` branch, not the `master` branch.
......@@ -36,7 +36,7 @@
<Key>XC9B7-NBPP2-83J2H-RHMBY-92BT4</Key>
<WillShowUI>Never</WillShowUI>
</ProductKey>
</UserData>
</UserData>
<ImageInstall>
<OSImage>
<InstallTo>
......@@ -94,6 +94,11 @@
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Home</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<SkipUserOOBE>true</SkipUserOOBE>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
</OOBE>
<AutoLogon>
<Password>
......
This diff is collapsed.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows-2012-r2"
config.vm.box = "windows_2012_r2"
config.vm.base_mac = "{{ .BaseMacAddress }}"
# 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
# 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
# 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"
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"
end
end
{
"builders": [{
"type": "vmware",
"iso_url": "./iso/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.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": "8dcde01d0da526100869e2457aafb7ca",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": true,
"boot_wait": "5m",
"ssh_username": "vagrant",
......@@ -27,9 +27,9 @@
}
}, {
"type": "virtualbox",
"iso_url": "./iso/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.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": "8dcde01d0da526100869e2457aafb7ca",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": true,
"boot_wait": "5m",
"ssh_username": "vagrant",
......
{
"builders": [{
"type": "vmware",
"iso_url": "./iso/en_windows_server_2012_x64_dvd_915478.iso",
"iso_url": "http://care.dlservice.microsoft.com//dl/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "da91135483e24689bfdaf05d40301506",
"iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d",
"headless": true,
"boot_wait": "5m",
"ssh_username": "vagrant",
......@@ -27,9 +27,9 @@
}
}, {
"type": "virtualbox",
"iso_url": "./iso/en_windows_server_2012_x64_dvd_915478.iso",
"iso_url": "http://care.dlservice.microsoft.com//dl/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "da91135483e24689bfdaf05d40301506",
"iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d",
"headless": true,
"boot_wait": "5m",
"ssh_username": "vagrant",
......
{
"builders": [{
"type": "vmware",
"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": "5m",
"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",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"./answer_files/2012_r2/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2"
}
}, {
"type": "virtualbox",
"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": "5m",
"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/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_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2012_r2.template"
}]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment