Update Windows Docker templates

parent 5c66e219
......@@ -7,13 +7,14 @@ reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
rem even harder, disable windows update service
rem sc config wuauserv start= disabled
rem net stop wuauserv
set logfile=C:\Windows\Temp\win-updates.log
if exist C:\Windows\Temp\win-updates.log (
echo Show Windows Updates log file C:\Windows\Temp\win-updates.log
dir C:\Windows\Temp\win-updates.log
type C:\Windows\Temp\win-updates.log
if exist %logfile% (
echo Show Windows Updates log file %logfile%
dir %logfile%
type %logfile%
rem output of type command is not fully shown in packer/ssh session, so try PowerShell
rem but it will hang if log file is about 22 KByte
rem powershell -command "Get-Content C:\Windows\Temp\win-updates.log"
echo End of Windows Updates log file C:\Windows\Temp\win-updates.log
rem powershell -command "Get-Content %logfile%"
echo End of Windows Updates log file %logfile%
)
......@@ -25,13 +25,23 @@ Vagrant.configure("2") do |config|
end
config.vm.provider :vmware_fusion do |v, override|
#v.gui = true
v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
v.vmx["mks.enable3d"] = "TRUE"
v.vmx["mks.forceDiscreteGPU"] = "TRUE"
v.vmx["gui.fullscreenatpoweron"] = "TRUE"
v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
v.vmx["sound.startconnected"] = "FALSE"
v.vmx["sound.present"] = "FALSE"
v.vmx["sound.autodetect"] = "TRUE"
v.vms["virtualhw.version"] = "11"
v.enable_vmrun_ip_lookup = false
v.whitelist_verified = true
end
......
......@@ -25,22 +25,13 @@ Vagrant.configure("2") do |config|
end
config.vm.provider :vmware_fusion do |v, override|
v.gui = true
#v.gui = true
v.vmx["memsize"] = "2048"
v.vmx["numvcpus"] = "2"
v.vmx["ethernet0.virtualDev"] = "vmxnet3"
v.vmx["RemoteDisplay.vnc.enabled"] = "false"
v.vmx["RemoteDisplay.vnc.port"] = "5900"
v.vmx["scsi0.virtualDev"] = "lsisas1068"
v.vmx["gui.fitguestusingnativedisplayresolution"] = "TRUE"
v.vmx["mks.enable3d"] = "TRUE"
v.vmx["mks.forceDiscreteGPU"] = "TRUE"
v.vmx["gui.fullscreenatpoweron"] = "TRUE"
v.vmx["gui.viewmodeatpoweron"] = "fullscreen"
v.vmx["gui.lastPoweredViewMode"] = "fullscreen"
v.vmx["sound.startconnected"] = "FALSE"
v.vmx["sound.present"] = "FALSE"
v.vmx["sound.autodetect"] = "TRUE"
v.vms["virtualhw.version"] = "11"
v.enable_vmrun_ip_lookup = false
v.whitelist_verified = true
......
......@@ -3,7 +3,7 @@
{
"vm_name":"WindowsServer2016",
"type": "hyperv-iso",
"disk_size": 41440,
"disk_size": "{{user `disk_size`}}",
"boot_wait": "0s",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
......@@ -44,7 +44,8 @@
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "a:/sysprep.bat",
"guest_os_type": "windows9srv-64",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "{{user `disk_type_id`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"version": 11,
......@@ -82,7 +83,7 @@
"shutdown_command": "a:/sysprep.bat",
"guest_os_type": "Windows2012_64",
"guest_additions_mode": "disable",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/disable-screensaver.ps1",
......@@ -132,9 +133,11 @@
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/pin-powershell.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/uac-enable.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/dis-updates.bat",
"./scripts/compact.bat"
]
}
......@@ -149,6 +152,8 @@
],
"variables": {
"headless": "false",
"disk_size": "61440",
"disk_type_id": "1",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
......
......@@ -3,7 +3,7 @@
{
"vm_name":"WindowsServer2016Core",
"type": "hyperv-iso",
"disk_size": 41440,
"disk_size": "{{user `disk_size`}}",
"boot_wait": "0s",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
......@@ -20,7 +20,7 @@
"communicator":"winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "4h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"ram_size": 2048,
"cpu": 2,
......@@ -37,10 +37,11 @@
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9srv-64",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "{{user `disk_type_id`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
......@@ -70,11 +71,11 @@
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
"guest_additions_mode": "disable",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/disable-screensaver.ps1",
......@@ -116,8 +117,10 @@
{
"type": "windows-shell",
"scripts": [
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/dis-updates.bat",
"./scripts/compact.bat"
]
}
......@@ -127,14 +130,17 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2016_core_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
"headless": "false",
"disk_size": "61440",
"disk_type_id": "1",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
"autounattend": "./answer_files/2016_core/Autounattend.xml"
"autounattend": "./answer_files/2016_core/Autounattend.xml",
"winrm_timeout": "6h"
}
}
......@@ -3,7 +3,7 @@
{
"vm_name":"windows_2016_dc",
"type": "hyperv-iso",
"disk_size": 41440,
"disk_size": "{{user `disk_size`}}",
"boot_wait": "0s",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
......@@ -41,7 +41,8 @@
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9srv-64",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "{{user `disk_type_id`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
......@@ -76,7 +77,7 @@
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
"guest_additions_mode": "disable",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/disable-screensaver.ps1",
......@@ -143,8 +144,10 @@
{
"type": "windows-shell",
"scripts": [
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/dis-updates.bat",
"./scripts/compact.bat"
]
}
......@@ -154,11 +157,13 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2016_dc_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
"headless": "false",
"disk_size": "61440",
"disk_type_id": "1",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
......
......@@ -11,8 +11,6 @@
"iso_checksum": "{{user `iso_checksum`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-screensaver.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
......@@ -52,8 +50,6 @@
"version": 11,
"floppy_files": [
"{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-screensaver.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
......@@ -90,8 +86,6 @@
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-screensaver.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
......@@ -134,20 +128,12 @@
"type": "windows-restart",
"restart_timeout": "{{user `restart_timeout`}}"
},
{
"type": "windows-shell",
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"scripts": [
"./scripts/pin-powershell.bat",
"./scripts/uac-enable.bat"
]
},
{
"type": "powershell",
"scripts": [
"./scripts/docker/add-docker-group.ps1",
"./scripts/docker/set-winrm-automatic.ps1",
"./scripts/docker/2016/install-docker.ps1",
"./scripts/docker/2016/install-docker-ee-preview.ps1",
"./scripts/docker/docker-pull-async.ps1",
"./scripts/docker/open-docker-insecure-port.ps1",
"./scripts/docker/open-docker-swarm-ports.ps1",
......@@ -158,9 +144,10 @@
{
"type": "windows-shell",
"scripts": [
"./scripts/uac-enable.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/dis-updates.bat",
"./scripts/compact.bat"
]
}
......@@ -170,7 +157,7 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2016_docker_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016_docker.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
......@@ -181,7 +168,7 @@
"iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
"autounattend": "./answer_files/2016/Autounattend.xml",
"autounattend": "./answer_files/2016_core/Autounattend.xml",
"restart_timeout": "5m",
"winrm_timeout": "6h"
}
......
{
"builders": [
{
"vm_name":"WindowsServer2016CoreDocker",
"type": "hyperv-iso",
"disk_size": 41440,
"boot_wait": "0s",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/docker/enable-winrm.ps1",
"./scripts/docker/2016/install-containers-feature.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1"
],
"communicator":"winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"ram_size": 2048,
"cpu": 2,
"switch_name":"{{user `hyperv_switchname`}}",
"enable_secure_boot":true,
"enable_virtualization_extensions":true
},
{
"type": "vmware-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": "{{user `headless`}}",
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9srv-64",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"{{user `autounattend`}}",
"./floppy/WindowsPowershell.lnk",
"./floppy/PinTo10.exe",
"./scripts/disable-screensaver.ps1",
"./scripts/disable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
"./scripts/docker/2016/install-containers-feature.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1"
],
"vmx_remove_ethernet_interfaces": true,
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068"
}
},
{
"type": "virtualbox-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": "{{user `headless`}}",
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
"guest_additions_mode": "disable",
"disk_size": 61440,
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/disable-winrm.ps1",
"./scripts/docker/enable-winrm.ps1",
"./scripts/microsoft-updates.bat",
"./scripts/win-updates.ps1"
],
"vboxmanage": [
[
"modifyvm",
"{{.Name}}",
"--memory",
"2048"
],
[
"modifyvm",
"{{.Name}}",
"--cpus",
"2"
]
]
}
],
"provisioners": [
{
"type": "windows-shell",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/enable-rdp.bat"
]
},
{
"type": "powershell",
"scripts": [
"./scripts/debloat-windows.ps1"
]
},
{
"type": "windows-restart",
"restart_timeout": "{{user `restart_timeout`}}"
},
{
"type": "powershell",
"scripts": [
"./scripts/docker/add-docker-group.ps1",
"./scripts/docker/2016/install-docker.ps1",
"./scripts/docker/docker-pull-async.ps1",
"./scripts/docker/open-docker-insecure-port.ps1",
"./scripts/docker/open-docker-swarm-ports.ps1",
"./scripts/docker/remove-docker-key-json.ps1",
"./scripts/docker/disable-windows-defender.ps1"
]
},
{
"type": "windows-restart",
"restart_timeout": "{{user `restart_timeout`}}"
},
{
"type": "windows-shell",
"scripts": [
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/uac-enable.bat",
"./scripts/compact.bat"
]
}
],
"post-processors": [
{
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_2016_docker_core_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
}
],
"variables": {
"headless": "false",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
"iso_checksum_type": "md5",
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
"autounattend": "./answer_files/2016_core/Autounattend.xml",
"restart_timeout": "5m",
"winrm_timeout": "6h"
}
}
......@@ -3,7 +3,7 @@
{
"vm_name":"HyperVServer2016",
"type": "hyperv-iso",
"disk_size": 41440,
"disk_size": "{{user `disk_size`}}",
"boot_wait": "0s",
"guest_additions_mode":"disable",
"iso_url": "{{user `iso_url`}}",
......@@ -19,7 +19,7 @@
"communicator":"winrm",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout" : "4h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"ram_size": 2048,
"cpu": 2,
......@@ -36,10 +36,11 @@
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows9srv-64",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "{{user `disk_type_id`}}",
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
......@@ -68,11 +69,11 @@
"boot_wait": "2m",
"winrm_username": "vagrant",
"winrm_password": "vagrant",
"winrm_timeout": "6h",
"winrm_timeout" : "{{user `winrm_timeout`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
"guest_additions_mode": "disable",
"disk_size": 61440,
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/disable-winrm.ps1",
......@@ -113,8 +114,10 @@
{
"type": "windows-shell",
"scripts": [
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/set-winrm-automatic.bat",
"./scripts/uac-enable.bat",
"./scripts/compile-dotnet-assemblies.bat",
"./scripts/dis-updates.bat",
"./scripts/compact.bat"
]
}
......@@ -129,9 +132,12 @@
],
"variables": {
"headless": "false",
"disk_size": "61440",
"disk_type_id": "1",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/8/8/6/886DAAEF-81A7-4418-82D5-07D33B816962/14393.0.161119-1705.RS1_REFRESH_SERVERHYPERCORE_OEM_X64FRE_EN-US.ISO",
"iso_checksum_type": "sha256",
"iso_checksum": "53e2f01dc4077192a85f60f8d2ffb02189074e19b25f990cbe9eb767328d3fb6",
"autounattend": "./answer_files/2016_hyperv/Autounattend.xml"
"autounattend": "./answer_files/2016_hyperv/Autounattend.xml",
"winrm_timeout": "6h"
}
}
......@@ -130,7 +130,7 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_server_1709_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
......
......@@ -147,7 +147,7 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_server_1709_docker_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
......
......@@ -117,7 +117,7 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_server_insider_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
......
......@@ -111,6 +111,7 @@
"./scripts/docker/2016/install-docker-ee-preview.ps1",
"./scripts/docker/docker-pull-insider-async.ps1",
"./scripts/docker/open-docker-insecure-port.ps1",
"./scripts/docker/open-docker-swarm-ports.ps1",
"./scripts/docker/remove-docker-key-json.ps1",
"./scripts/docker/disable-windows-defender.ps1"
]
......@@ -121,7 +122,7 @@
"type": "vagrant",
"keep_input_artifact": false,
"output": "windows_server_insider_docker_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2016.template"
"vagrantfile_template": "vagrantfile-windows_2016_core.template"
}
],
"variables": {
......
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