Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Bob Tanner
packer-windows
Commits
3ab0140d
Commit
3ab0140d
authored
Oct 21, 2015
by
Stefan Scherer
Browse files
more WinRM
parent
f89a515e
Changes
3
Hide whitespace changes
Inline
Side-by-side
answer_files/2012_r2/Autounattend.xml
View file @
3ab0140d
<?xml version="1.0" encoding="utf-8"?>
<unattend
xmlns=
"urn:schemas-microsoft-com:unattend"
>
<settings
pass=
"windowsPE"
>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-International-Core-WinPE"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-International-Core-WinPE"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<SetupUILanguage>
<UILanguage>
en-US
</UILanguage>
</SetupUILanguage>
<InputLocale>
de-DE
</InputLocale>
<SystemLocale>
de-DE
</SystemLocale>
<InputLocale>
en-US
</InputLocale>
<SystemLocale>
en-US
</SystemLocale>
<UILanguage>
en-US
</UILanguage>
<UILanguageFallback>
en-US
</UILanguageFallback>
<UserLocale>
de-DE
</UserLocale>
<UserLocale>
en-US
</UserLocale>
</component>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<DiskConfiguration>
<Disk
wcm:action=
"add"
>
<CreatePartitions>
...
...
@@ -75,30 +75,49 @@
</component>
</settings>
<settings
pass=
"specialize"
>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-Shell-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-Shell-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<OEMInformation>
<HelpCustomized>
false
</HelpCustomized>
</OEMInformation>
<ComputerName>
vagrant-2012-r2
</ComputerName>
<TimeZone>
W. Europe Standard Time
</TimeZone>
<RegisteredOwner/>
<RegisteredOwner
/>
</component>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-ServerManager-SvrMgrNc"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-ServerManager-SvrMgrNc"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<DoNotOpenServerManagerAtLogon>
true
</DoNotOpenServerManagerAtLogon>
</component>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-IE-ESC"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-IE-ESC"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<IEHardenAdmin>
false
</IEHardenAdmin>
<IEHardenUser>
false
</IEHardenUser>
</component>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-OutOfBoxExperience"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-OutOfBoxExperience"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<DoNotOpenInitialConfigurationTasksAtLogon>
true
</DoNotOpenInitialConfigurationTasksAtLogon>
</component>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-Security-SPP-UX"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-Security-SPP-UX"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<SkipAutoActivation>
true
</SkipAutoActivation>
</component>
<component
name=
"Microsoft-Windows-Deployment"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<RunSynchronous>
<RunSynchronousCommand
wcm:action=
"add"
>
<Order>
1
</Order>
<Description>
Set Execution Policy 64 Bit
</Description>
<Path>
cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
</Path>
</RunSynchronousCommand>
<RunSynchronousCommand
wcm:action=
"add"
>
<Order>
2
</Order>
<Description>
Set Execution Policy 32 Bit
</Description>
<Path>
cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"
</Path>
</RunSynchronousCommand>
<RunSynchronousCommand
wcm:action=
"add"
>
<Order>
3
</Order>
<Description>
Disable WinRM
</Description>
<Path>
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-winrm.ps1
</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings
pass=
"oobeSystem"
>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-Shell-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-Shell-Setup"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<AutoLogon>
<Password>
<Value>
vagrant
</Value>
...
...
@@ -121,143 +140,63 @@
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm quickconfig -q
</CommandLine>
<Description>
winrm quickconfig -q
</Description>
<CommandLine>
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-winrm.ps1
</CommandLine>
<Description>
Disable WinRM
</Description>
<Order>
3
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm quickconfig -transport:http
</CommandLine>
<Description>
winrm quickconfig -transport:http
</Description>
<Order>
4
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config @{MaxTimeoutms="1800000"}
</CommandLine>
<Description>
Win RM MaxTimoutms
</Description>
<Order>
5
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="800"}
</CommandLine>
<Description>
Win RM MaxMemoryPerShellMB
</Description>
<Order>
6
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config/service @{AllowUnencrypted="true"}
</CommandLine>
<Description>
Win RM AllowUnencrypted
</Description>
<Order>
7
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config/service/auth @{Basic="true"}
</CommandLine>
<Description>
Win RM auth Basic
</Description>
<Order>
8
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config/client/auth @{Basic="true"}
</CommandLine>
<Description>
Win RM client auth Basic
</Description>
<Order>
9
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"}
</CommandLine>
<Description>
Win RM listener Address/Port
</Description>
<Order>
10
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c netsh advfirewall firewall set rule group="remote administration" new enable=yes
</CommandLine>
<Description>
Win RM adv firewall enable
</Description>
<Order>
11
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c netsh firewall add portopening TCP 5985 "Port 5985"
</CommandLine>
<Description>
Win RM port open
</Description>
<Order>
12
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c net stop winrm
</CommandLine>
<Description>
Stop Win RM Service
</Description>
<Order>
13
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c sc config winrm start= auto
</CommandLine>
<Description>
Win RM Autostart
</Description>
<Order>
14
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c net start winrm
</CommandLine>
<Description>
Start Win RM Service
</Description>
<Order>
15
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f
</CommandLine>
<Order>
16
</Order>
<Order>
4
</Order>
<Description>
Show file extensions in Explorer
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
</CommandLine>
<Order>
17
</Order>
<Order>
5
</Order>
<Description>
Enable QuickEdit mode
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f
</CommandLine>
<Order>
18
</Order>
<Order>
6
</Order>
<Description>
Show Run command in Start Menu
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f
</CommandLine>
<Order>
19
</Order>
<Order>
7
</Order>
<Description>
Show Administrative Tools in Start Menu
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f
</CommandLine>
<Order>
20
</Order>
<Order>
8
</Order>
<Description>
Zero Hibernation File
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f
</CommandLine>
<Order>
21
</Order>
<Order>
9
</Order>
<Description>
Disable Hibernation Mode
</Description>
</SynchronousCommand>
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE
</CommandLine>
<Order>
22
</Order>
<Order>
10
</Order>
<Description>
Disable password expiration for vagrant user
</Description>
</SynchronousCommand>
<!-- WITHOUT WINDOWS UPDATES -->
<!--
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\dis-updates.ps1</CommandLine>
<Description>Disable Automatic Updates</Description>
<Order>97</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1 -AutoStart</CommandLine>
<Description>Install OpenSSH</Description>
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
<Description>Enable WinRM</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
-->
<!-- END WITHOUT WINDOWS UPDATES -->
<!-- WITH WINDOWS UPDATES -->
<SynchronousCommand
wcm:action=
"add"
>
<CommandLine>
cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\dis-updates.ps1
</CommandLine>
<Description>
Disable Automatic Updates
</Description>
<Order>
97
</Order>
<RequiresUserInput>
true
</RequiresUserInput>
<CommandLine>
cmd.exe /c a:\microsoft-updates.bat
</CommandLine>
<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:\win-updates.ps1
-MaxUpdatesPerCycle 30
</CommandLine>
<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>
...
...
@@ -291,13 +230,13 @@
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOwner/>
<RegisteredOwner
/>
</component>
</settings>
<settings
pass=
"offlineServicing"
>
<component
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
name=
"Microsoft-Windows-LUA-Settings"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
>
<component
name=
"Microsoft-Windows-LUA-Settings"
processorArchitecture=
"amd64"
publicKeyToken=
"31bf3856ad364e35"
language=
"neutral"
versionScope=
"nonSxS"
xmlns:wcm=
"http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<EnableLUA>
false
</EnableLUA>
</component>
</settings>
<cpi:offlineImage
xmlns:cpi=
"urn:schemas-microsoft-com:cpi"
cpi:source=
"wim:c:/wim/install.wim#Windows Server 2012 R2 SERVERSTANDARD"
/>
<cpi:offlineImage
cpi:source=
"wim:c:/wim/install.wim#Windows Server 2012 R2 SERVERSTANDARD"
xmlns:cpi=
"urn:schemas-microsoft-com:cpi"
/>
</unattend>
windows_2012_r2.json
View file @
3ab0140d
...
...
@@ -2,25 +2,27 @@
"builders"
:
[
{
"type"
:
"vmware-iso"
,
"iso_url"
:
"http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
,
"iso_checksum_type"
:
"md5"
,
"iso_checksum"
:
"5b5e08c490ad16b59b1d9fab0def883a"
,
"communicator"
:
"winrm"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"{{user `iso_checksum`}}"
,
"headless"
:
true
,
"boot_wait"
:
"2m"
,
"
ssh
_username"
:
"vagrant"
,
"
ssh
_password"
:
"vagrant"
,
"
ssh_wait
_timeout"
:
"6h"
,
"
winrm
_username"
:
"vagrant"
,
"
winrm
_password"
:
"vagrant"
,
"
winrm
_timeout"
:
"6h"
,
"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"
:
131072
,
"disk_size"
:
61440
,
"vnc_port_min"
:
5900
,
"vnc_port_max"
:
5980
,
"skip_compaction"
:
true
,
"floppy_files"
:
[
"./answer_files/2012_r2/Autounattend.xml"
,
"{{user `autounattend`}}"
,
"./scripts/disable-winrm.ps1"
,
"./scripts/enable-winrm.ps1"
,
"./scripts/microsoft-updates.bat"
,
"./scripts/win-updates.ps1"
,
"./scripts/openssh.ps1"
"./scripts/win-updates.ps1"
],
"vmx_data"
:
{
"RemoteDisplay.vnc.enabled"
:
"false"
,
...
...
@@ -32,22 +34,25 @@
},
{
"type"
:
"virtualbox-iso"
,
"iso_url"
:
"http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
,
"iso_checksum_type"
:
"md5"
,
"iso_checksum"
:
"5b5e08c490ad16b59b1d9fab0def883a"
,
"communicator"
:
"winrm"
,
"iso_url"
:
"{{user `iso_url`}}"
,
"iso_checksum_type"
:
"{{user `iso_checksum_type`}}"
,
"iso_checksum"
:
"{{user `iso_checksum`}}"
,
"headless"
:
true
,
"boot_wait"
:
"2m"
,
"
ssh
_username"
:
"vagrant"
,
"
ssh
_password"
:
"vagrant"
,
"
ssh_wait
_timeout"
:
"6h"
,
"
winrm
_username"
:
"vagrant"
,
"
winrm
_password"
:
"vagrant"
,
"
winrm
_timeout"
:
"6h"
,
"shutdown_command"
:
"shutdown /s /t 10 /f /d p:4:1 /c
\"
Packer Shutdown
\"
"
,
"guest_os_type"
:
"Windows2012_64"
,
"disk_size"
:
131072
,
"guest_additions_mode"
:
"disable"
,
"disk_size"
:
61440
,
"floppy_files"
:
[
"./answer_files/2012_r2/Autounattend.xml"
,
"{{user `autounattend`}}"
,
"./scripts/disable-winrm.ps1"
,
"./scripts/enable-winrm.ps1"
,
"./scripts/microsoft-updates.bat"
,
"./scripts/win-updates.ps1"
,
"./scripts/openssh.ps1"
,
"./scripts/oracle-cert.cer"
],
"vboxmanage"
:
[
...
...
@@ -68,24 +73,13 @@
],
"provisioners"
:
[
{
"type"
:
"shell"
,
"remote_path"
:
"/tmp/script.bat"
,
"execute_command"
:
"{{.Vars}} cmd /c C:/Windows/Temp/script.bat"
,
"type"
:
"windows-shell"
,
"scripts"
:
[
"./scripts/vm-guest-tools.bat"
,
"./scripts/chef.bat"
,
"./scripts/vagrant-ssh.bat"
,
"./scripts/enable-rdp.bat"
,
"./scripts/compile-dotnet-assemblies.bat"
,
"./scripts/disable-auto-logon.bat"
,
"./scripts/compact.bat"
]
},
{
"type"
:
"shell"
,
"inline"
:
[
"rm -rf /tmp/*"
]
}
],
"post-processors"
:
[
...
...
@@ -95,5 +89,11 @@
"output"
:
"windows_2012_r2_{{.Provider}}.box"
,
"vagrantfile_template"
:
"vagrantfile-windows_2012_r2.template"
}
]
],
"variables"
:
{
"iso_url"
:
"http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO"
,
"iso_checksum_type"
:
"md5"
,
"iso_checksum"
:
"5b5e08c490ad16b59b1d9fab0def883a"
,
"autounattend"
:
"./answer_files/2012_r2/Autounattend.xml"
}
}
windows_2012_r2_core.json
View file @
3ab0140d
...
...
@@ -71,12 +71,8 @@
}
],
"provisioners"
:
[
{
"type"
:
"windows-restart"
},
{
"type"
:
"windows-shell"
,
"execute_command"
:
"{{ .Vars }} cmd /c
\"
{{ .Path }}
\"
"
,
"scripts"
:
[
"./scripts/vm-guest-tools.bat"
,
"./scripts/enable-rdp.bat"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment