diff --git a/CHANGELOG.md b/CHANGELOG.md
index 463a61b5..a45af33f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/README.md b/README.md
index 2210e338..549fcbdf 100644
--- a/README.md
+++ b/README.md
@@ -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.
diff --git a/answer_files/2008_r2/Autounattend.xml b/answer_files/2008_r2/Autounattend.xml
index fe961984..ed1e5ef0 100644
--- a/answer_files/2008_r2/Autounattend.xml
+++ b/answer_files/2008_r2/Autounattend.xml
@@ -247,12 +247,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/2008_r2_core/Autounattend.xml b/answer_files/2008_r2_core/Autounattend.xml
index 426ee521..23a5bf61 100644
--- a/answer_files/2008_r2_core/Autounattend.xml
+++ b/answer_files/2008_r2_core/Autounattend.xml
@@ -283,12 +283,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/2012/Autounattend.xml b/answer_files/2012/Autounattend.xml
index bb60d5f9..17fa9162 100644
--- a/answer_files/2012/Autounattend.xml
+++ b/answer_files/2012/Autounattend.xml
@@ -252,12 +252,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/2012_r2/Autounattend.xml b/answer_files/2012_r2/Autounattend.xml
index 1a4e8b40..0fc1293d 100644
--- a/answer_files/2012_r2/Autounattend.xml
+++ b/answer_files/2012_r2/Autounattend.xml
@@ -249,12 +249,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/2012_r2_core/Autounattend.xml b/answer_files/2012_r2_core/Autounattend.xml
index f088f3ca..d01e0c59 100644
--- a/answer_files/2012_r2_core/Autounattend.xml
+++ b/answer_files/2012_r2_core/Autounattend.xml
@@ -249,12 +249,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/7/Autounattend.xml b/answer_files/7/Autounattend.xml
index 81e34054..9fb9b372 100644
--- a/answer_files/7/Autounattend.xml
+++ b/answer_files/7/Autounattend.xml
@@ -248,12 +248,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/answer_files/81/Autounattend.xml b/answer_files/81/Autounattend.xml
index bc4b1e8a..00ea2457 100644
--- a/answer_files/81/Autounattend.xml
+++ b/answer_files/81/Autounattend.xml
@@ -245,12 +245,6 @@
98
Enable Microsoft Updates
-
- cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1
- Install OpenSSH
- 99
- true
-
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1
Install Windows Updates
diff --git a/scripts/disable-auto-logon.bat b/scripts/disable-auto-logon.bat
new file mode 100644
index 00000000..b3e8c04c
--- /dev/null
+++ b/scripts/disable-auto-logon.bat
@@ -0,0 +1 @@
+reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 0 /f
\ No newline at end of file
diff --git a/scripts/win-updates.ps1 b/scripts/win-updates.ps1
index 672c0756..7810d7a8 100755
--- a/scripts/win-updates.ps1
+++ b/scripts/win-updates.ps1
@@ -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 {
@@ -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
}
@@ -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
diff --git a/vagrantfile-windows_2008_r2.template b/vagrantfile-windows_2008_r2.template
index 2a8c30f0..92fbe200 100644
--- a/vagrantfile-windows_2008_r2.template
+++ b/vagrantfile-windows_2008_r2.template
@@ -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
diff --git a/vagrantfile-windows_2012.template b/vagrantfile-windows_2012.template
index 69256bff..03f34e85 100644
--- a/vagrantfile-windows_2012.template
+++ b/vagrantfile-windows_2012.template
@@ -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
diff --git a/vagrantfile-windows_2012_r2.template b/vagrantfile-windows_2012_r2.template
index 7dbe7545..0955ec9b 100644
--- a/vagrantfile-windows_2012_r2.template
+++ b/vagrantfile-windows_2012_r2.template
@@ -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
diff --git a/vagrantfile-windows_7.template b/vagrantfile-windows_7.template
index 693ba548..dbc28c1a 100644
--- a/vagrantfile-windows_7.template
+++ b/vagrantfile-windows_7.template
@@ -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
diff --git a/vagrantfile-windows_81.template b/vagrantfile-windows_81.template
index f4bf80cf..37f5dc28 100644
--- a/vagrantfile-windows_81.template
+++ b/vagrantfile-windows_81.template
@@ -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
diff --git a/windows_2008_r2.json b/windows_2008_r2.json
index 06a9a288..0a090bab 100644
--- a/windows_2008_r2.json
+++ b/windows_2008_r2.json
@@ -76,6 +76,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
+ "./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
diff --git a/windows_2008_r2_core.json b/windows_2008_r2_core.json
index f186d2f1..3ecd7c2c 100644
--- a/windows_2008_r2_core.json
+++ b/windows_2008_r2_core.json
@@ -76,6 +76,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
+ "./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
diff --git a/windows_2012.json b/windows_2012.json
index f9e62cb2..ee16410b 100644
--- a/windows_2012.json
+++ b/windows_2012.json
@@ -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"
]
},
diff --git a/windows_2012_r2.json b/windows_2012_r2.json
index 11456f8c..d048b026 100644
--- a/windows_2012_r2.json
+++ b/windows_2012_r2.json
@@ -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"
]
},
diff --git a/windows_2012_r2_core.json b/windows_2012_r2_core.json
index 33779345..64c91082 100644
--- a/windows_2012_r2_core.json
+++ b/windows_2012_r2_core.json
@@ -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"
]
},
diff --git a/windows_7.json b/windows_7.json
index 46736325..12082921 100644
--- a/windows_7.json
+++ b/windows_7.json
@@ -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",
@@ -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"
]
},
{
diff --git a/windows_81.json b/windows_81.json
index 487add7c..6f644d67 100644
--- a/windows_81.json
+++ b/windows_81.json
@@ -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",
@@ -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"
]
},
{