Commit 31d7c8e3 authored by Stefan Scherer's avatar Stefan Scherer

Merge remote-tracking branch 'upstream/master' into my

Conflicts:
	windows_7.json
parents 42aa34e0 0c6500d3
## 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)
......
......@@ -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.
......
......@@ -251,12 +251,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>
......
......@@ -287,12 +287,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>
......
......@@ -251,12 +251,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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -244,12 +244,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>
......
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /d 0 /f
\ No newline at end of file
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -78,6 +78,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
......
......@@ -62,6 +62,7 @@
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/enable-rdp.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/compact.bat"
]
},
......
......@@ -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"
]
},
......
......@@ -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"
]
},
......
......@@ -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"
]
},
......
......@@ -36,7 +36,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",
......@@ -77,8 +77,11 @@
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/vagrant-ssh.bat",
"./scripts/disable-auto-logon.bat",
"./scripts/enable-rdp.bat",
"./scripts/enable-winrm.bat"
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/compact.bat"
]
},
{
......
......@@ -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"
]
},
{
......
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