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/v1.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Sykora committed Sep 8, 2014
2 parents ef79255 + ff2c28f commit 0c6500d
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 58 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## v1.22 (not yet released)
## v1.22 (Sept 8th, 2014)

* Forward SSH port by default on Vagrant boxes (#76)
* Box no longer auto logs on upon boot (#66)
* Updated Virtualbox Guest OS Type for Win8.1 (#81)

## v1.21 (Aug 6th, 2014)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Introduction

This repository contains Windows templates that can be used to create boxes for Vagrant using Packer ([Website](packer.io)) ([Github](http://github.com/mitchellh/packer)).
This repository contains Windows templates that can be used to create boxes for Vagrant using Packer ([Website](http://www.packer.io)) ([Github](http://github.com/mitchellh/packer)).

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 / VirtualBox providers for Packer and Vagrant.

Expand Down
6 changes: 0 additions & 6 deletions answer_files/2008_r2/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/2008_r2_core/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/2012/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/2012_r2/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/2012_r2_core/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/7/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
6 changes: 0 additions & 6 deletions answer_files/81/Autounattend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,6 @@
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<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>
Expand Down
1 change: 1 addition & 0 deletions scripts/disable-auto-logon.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 0 /f
11 changes: 2 additions & 9 deletions scripts/win-updates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ function Check-ContinueRestartOrEnd() {
Check-WindowsUpdates

if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) {
Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped
Install-WindowsUpdates
} elseif ($script:Cycles -gt $global:MaxCycles) {
Write-Host "Exceeded Cycle Count - Stopping"
} else {
Write-Host "Done Installing Windows Updates"
Set-Service -Name $script:ServiceName -StartupType Automatic -Status Running
Invoke-Expression "a:\openssh.ps1 -AutoStart"
}
}
1 {
Expand Down Expand Up @@ -99,7 +97,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
Invoke-Expression "a:\openssh.ps1 -AutoStart"
break
}

Expand Down Expand Up @@ -164,11 +162,6 @@ $script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher()
$script:SearchResult = New-Object -ComObject 'Microsoft.Update.UpdateColl'
$script:Cycles = 0

$script:ServiceName = "OpenSSHd"

Stop-Service $script:ServiceName -Force
Set-Service -Name $script:ServiceName -StartupType Disabled -Status Stopped

Check-WindowsUpdates
if ($global:MoreUpdates -eq 1) {
Install-WindowsUpdates
Expand Down
2 changes: 1 addition & 1 deletion vagrantfile-windows_2008_r2.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Vagrant.configure("2") do |config|
config.windows.halt_timeout = 15

config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true

config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider :virtualbox do |v, override|
#v.gui = true
Expand Down
1 change: 1 addition & 0 deletions vagrantfile-windows_2012.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Vagrant.configure("2") do |config|
config.windows.halt_timeout = 15

config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider :virtualbox do |v, override|
#v.gui = true
Expand Down
1 change: 1 addition & 0 deletions vagrantfile-windows_2012_r2.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Vagrant.configure("2") do |config|
config.windows.halt_timeout = 15

config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider :virtualbox do |v, override|
#v.gui = true
Expand Down
1 change: 1 addition & 0 deletions vagrantfile-windows_7.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Vagrant.configure("2") do |config|
config.windows.halt_timeout = 15

config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider :virtualbox do |v, override|
#v.gui = true
Expand Down
1 change: 1 addition & 0 deletions vagrantfile-windows_81.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Vagrant.configure("2") do |config|
config.windows.halt_timeout = 15

config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", auto_correct: true

config.vm.provider :virtualbox do |v, override|
#v.gui = true
Expand Down
1 change: 1 addition & 0 deletions windows_2008_r2.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
Expand Down
1 change: 1 addition & 0 deletions windows_2008_r2_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
Expand Down
1 change: 1 addition & 0 deletions windows_2012.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/enable-rdp.bat"
]
},
Expand Down
1 change: 1 addition & 0 deletions windows_2012_r2.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
Expand Down
1 change: 1 addition & 0 deletions windows_2012_r2_core.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
Expand Down
7 changes: 5 additions & 2 deletions windows_7.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"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,
"headless": true,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
Expand Down Expand Up @@ -75,7 +75,10 @@
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat"
"./scripts/disable-auto-logon.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/compact.bat"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions windows_81.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"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",
"guest_os_type": "Windows81_64",
"disk_size": 61440,
"floppy_files": [
"./answer_files/81/Autounattend.xml",
Expand Down Expand Up @@ -75,7 +75,10 @@
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat"
"./scripts/disable-auto-logon.bat",
"./scripts/enable-rdp.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/compact.bat"
]
},
{
Expand Down

0 comments on commit 0c6500d

Please sign in to comment.