From 62c50a30f3e35c6c592a4d49da0df2e2268bcb53 Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Sat, 14 Dec 2019 13:49:23 +0100 Subject: [PATCH] Add Windows Server, Version 1909 --- README.md | 4 +- answer_files/server_1909/Autounattend.xml | 227 ++++++++++++++++++++++ build_windows_server_1903_docker.sh | 2 +- build_windows_server_1909_docker.sh | 8 + windows_server_1809.json | 2 +- windows_server_1809_docker.json | 2 +- windows_server_1903.json | 8 +- windows_server_1903_docker.json | 8 +- windows_server_1909.json | 150 ++++++++++++++ windows_server_1909_docker.json | 178 +++++++++++++++++ windows_server_insider.json | 2 +- windows_server_insider_docker.json | 2 +- 12 files changed, 578 insertions(+), 15 deletions(-) create mode 100644 answer_files/server_1909/Autounattend.xml create mode 100755 build_windows_server_1909_docker.sh create mode 100644 windows_server_1909.json create mode 100644 windows_server_1909_docker.json diff --git a/README.md b/README.md index 3ce90282..d44beb6f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The following Windows versions are known to work (built with VMware Fusion Pro * Windows Server Core * Windows Server 2016 without and with Docker -> Vagrant Cloud box [StefanScherer/windows_2016_docker](https://app.vagrantup.com/StefanScherer/boxes/windows_2016_docker) * Windows Server 2019 without and with Docker -> Vagrant Cloud box [StefanScherer/windows_2019_docker](https://app.vagrantup.com/StefanScherer/boxes/windows_2019_docker) - * Windows Server 1709, 1803, 1809, and 1903 all without and with Docker + * Windows Server 1709, 1803, 1809, 1903, and 1909 all without and with Docker * Windows Server InsiderPreview Semi-Annual without and with Docker You may find other packer template files, but older versions of Windows doesn't @@ -198,4 +198,4 @@ vagrant up --provider hyperv ### Contributing -Pull requests welcomed, but normally should go to Joe's repo. +Pull request are welcome! diff --git a/answer_files/server_1909/Autounattend.xml b/answer_files/server_1909/Autounattend.xml new file mode 100644 index 00000000..15e175b0 --- /dev/null +++ b/answer_files/server_1909/Autounattend.xml @@ -0,0 +1,227 @@ + + + + + + en-US + + en-US + en-US + en-US + en-US + en-US + + + + + + + Primary + 1 + 350 + + + 2 + Primary + true + + + + + true + NTFS + + 1 + 1 + + + NTFS + + C + 2 + 2 + + + 0 + true + + + + + + + /IMAGE/INDEX + 2 + + + + 0 + 2 + + + + + + + + OnError + + true + Vagrant + Vagrant + + + + + + + false + + vagrant-1909 + Pacific Standard Time + + + + true + + + false + false + + + true + + + true + + + + + + + vagrant + true</PlainText> + </Password> + <Enabled>true</Enabled> + <Username>vagrant</Username> + </AutoLogon> + <FirstLogonCommands> + <SynchronousCommand wcm:action="add"> + <CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 64 Bit</Description> + <Order>1</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine> + <Description>Set Execution Policy 32 Bit</Description> + <Order>2</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <SynchronousCommand wcm:action="add"> + <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>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine> + <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>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>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>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>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>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>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:\enable-winrm.ps1</CommandLine> + <Description>Enable WinRM</Description> + <Order>99</Order> + </SynchronousCommand> + --> + <!-- END WITHOUT WINDOWS UPDATES --> + <!-- WITH WINDOWS UPDATES --> + <SynchronousCommand wcm:action="add"> + <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:\disable-screensaver.ps1</CommandLine> + <Description>Disable Screensaver</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> + <Order>100</Order> + <RequiresUserInput>true</RequiresUserInput> + </SynchronousCommand> + <!-- END WITH WINDOWS UPDATES --> + </FirstLogonCommands> + <OOBE> + <HideEULAPage>true</HideEULAPage> + <HideLocalAccountScreen>true</HideLocalAccountScreen> + <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> + <HideOnlineAccountScreens>true</HideOnlineAccountScreens> + <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> + <NetworkLocation>Home</NetworkLocation> + <ProtectYourPC>1</ProtectYourPC> + </OOBE> + <UserAccounts> + <AdministratorPassword> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </AdministratorPassword> + <LocalAccounts> + <LocalAccount wcm:action="add"> + <Password> + <Value>vagrant</Value> + <PlainText>true</PlainText> + </Password> + <Group>administrators</Group> + <DisplayName>Vagrant</DisplayName> + <Name>vagrant</Name> + <Description>Vagrant User</Description> + </LocalAccount> + </LocalAccounts> + </UserAccounts> + <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"> + <EnableLUA>false</EnableLUA> + </component> + </settings> + <cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/wim/install.wim#Windows Server 2016 SERVERSTANDARD"/> +</unattend> diff --git a/build_windows_server_1903_docker.sh b/build_windows_server_1903_docker.sh index 40aaf881..d6fcd779 100755 --- a/build_windows_server_1903_docker.sh +++ b/build_windows_server_1903_docker.sh @@ -3,6 +3,6 @@ packer build \ --only=vmware-iso \ --var vhv_enable=true \ - --var iso_url=~/packer_cache/msdn/en_windows_server_version_1903_x64_dvd_58ddff4b.iso \ + --var iso_url=~/packer_cache/msdn/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso \ --var autounattend=./tmp/1903/Autounattend.xml \ windows_server_1903_docker.json diff --git a/build_windows_server_1909_docker.sh b/build_windows_server_1909_docker.sh new file mode 100755 index 00000000..98e5ccbd --- /dev/null +++ b/build_windows_server_1909_docker.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# MSDN 1909 ISO +packer build \ + --only=vmware-iso \ + --var vhv_enable=true \ + --var iso_url=~/packer_cache/msdn/en_windows_server_version_1909_x64_dvd_894c6446.iso \ + windows_server_1909_docker.json + # --var autounattend=./tmp/1909/Autounattend.xml \ diff --git a/windows_server_1809.json b/windows_server_1809.json index f1426a92..36f20c83 100644 --- a/windows_server_1809.json +++ b/windows_server_1809.json @@ -100,7 +100,7 @@ "keep_input_artifact": false, "output": "windows_server_1809_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [ diff --git a/windows_server_1809_docker.json b/windows_server_1809_docker.json index 17d855df..c6b27c15 100644 --- a/windows_server_1809_docker.json +++ b/windows_server_1809_docker.json @@ -104,7 +104,7 @@ "keep_input_artifact": false, "output": "windows_server_1809_docker_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [ diff --git a/windows_server_1903.json b/windows_server_1903.json index 7d692bc0..25906da3 100644 --- a/windows_server_1903.json +++ b/windows_server_1903.json @@ -100,7 +100,7 @@ "keep_input_artifact": false, "output": "windows_server_1903_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [ @@ -138,10 +138,10 @@ "disk_size": "61440", "disk_type_id": "1", "headless": "false", - "iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be", + "iso_checksum": "F00082EF6BA6FD7A5E99EF9C01958ABD9D6702D7AAD34262E109989E5D9D0027", "iso_checksum_type": "sha256", - "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_x64_dvd_58ddff4b.iso", - "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201903", + "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso", + "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=windows%20server%201903&pgroup=", "restart_timeout": "5m", "vhv_enable": "false", "winrm_timeout": "2h" diff --git a/windows_server_1903_docker.json b/windows_server_1903_docker.json index 7ae436dd..5293e35a 100644 --- a/windows_server_1903_docker.json +++ b/windows_server_1903_docker.json @@ -104,7 +104,7 @@ "keep_input_artifact": false, "output": "windows_server_1903_docker_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [ @@ -166,10 +166,10 @@ "docker_provider": "ee", "docker_version": "19.03.5", "headless": "false", - "iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be", + "iso_checksum": "F00082EF6BA6FD7A5E99EF9C01958ABD9D6702D7AAD34262E109989E5D9D0027", "iso_checksum_type": "sha256", - "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_x64_dvd_58ddff4b.iso", - "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201903", + "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1903_updated_nov_2019_x64_dvd_78832616.iso", + "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=windows%20server%201903&pgroup=", "restart_timeout": "5m", "vhv_enable": "true", "winrm_timeout": "2h" diff --git a/windows_server_1909.json b/windows_server_1909.json new file mode 100644 index 00000000..cec8e363 --- /dev/null +++ b/windows_server_1909.json @@ -0,0 +1,150 @@ +{ + "builders": [ + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./scripts/disable-screensaver.ps1", + "./scripts/disable-winrm.ps1", + "./scripts/enable-winrm.ps1", + "./scripts/microsoft-updates.bat", + "./scripts/win-updates.ps1" + ], + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "WindowsServer1909", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_adapter_type": "lsisas1068", + "disk_size": "{{user `disk_size`}}", + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./scripts/disable-screensaver.ps1", + "./scripts/disable-winrm.ps1", + "./scripts/enable-winrm.ps1", + "./scripts/microsoft-updates.bat", + "./scripts/win-updates.ps1" + ], + "guest_os_type": "windows9srv-64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 14, + "vm_name": "WindowsServer1909", + "vmx_data": { + "RemoteDisplay.vnc.enabled": "false", + "RemoteDisplay.vnc.port": "5900", + "vhv.enable": "{{user `vhv_enable`}}" + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_size": "{{user `disk_size`}}", + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./scripts/disable-screensaver.ps1", + "./scripts/disable-winrm.ps1", + "./scripts/enable-winrm.ps1", + "./scripts/microsoft-updates.bat", + "./scripts/win-updates.ps1" + ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2016_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", + "vm_name": "WindowsServer1909", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_1909_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2019_core.template" + } + ], + "provisioners": [ + { + "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" + }, + { + "scripts": [ + "./scripts/debloat-windows.ps1" + ], + "type": "powershell" + }, + { + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" + }, + { + "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "scripts": [ + "./scripts/set-winrm-automatic.bat", + "./scripts/compile-dotnet-assemblies.bat", + "./scripts/uac-enable.bat", + "./scripts/compact.bat" + ], + "type": "windows-shell" + } + ], + "variables": { + "autounattend": "./answer_files/server_1909/Autounattend.xml", + "disk_size": "61440", + "disk_type_id": "1", + "headless": "false", + "iso_checksum": "62256AE2D89C93990963185065B53E7806E0203E9EFCFBF15E2FAFB3FA31FE84", + "iso_checksum_type": "sha256", + "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1909_x64_dvd_894c6446.iso", + "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201909", + "restart_timeout": "5m", + "vhv_enable": "false", + "winrm_timeout": "2h" + } +} + diff --git a/windows_server_1909_docker.json b/windows_server_1909_docker.json new file mode 100644 index 00000000..15cf5e49 --- /dev/null +++ b/windows_server_1909_docker.json @@ -0,0 +1,178 @@ +{ + "builders": [ + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./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" + ], + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "WindowsServer1909Docker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_adapter_type": "lsisas1068", + "disk_size": "{{user `disk_size`}}", + "disk_type_id": "{{user `disk_type_id`}}", + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./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" + ], + "guest_os_type": "windows9srv-64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 14, + "vm_name": "WindowsServer1909Docker", + "vmx_data": { + "RemoteDisplay.vnc.enabled": "false", + "RemoteDisplay.vnc.port": "5900", + "vhv.enable": "{{user `vhv_enable`}}" + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", + "cpus": 2, + "disk_size": "{{user `disk_size`}}", + "floppy_files": [ + "{{user `autounattend`}}", + "./floppy/WindowsPowershell.lnk", + "./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" + ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2016_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "memory": 2048, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", + "vm_name": "WindowsServer1909Docker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_1909_docker_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2019_core.template" + } + ], + "provisioners": [ + { + "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" + }, + { + "scripts": [ + "./scripts/docker/2016/install-containers-feature.ps1", + "./scripts/docker/set-winrm-delayed-automatic.ps1" + ], + "type": "powershell" + }, + { + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" + }, + { + "environment_vars": [ + "docker_images={{user `docker_images`}}", + "docker_provider={{user `docker_provider`}}", + "docker_version={{user `docker_version`}}" + ], + "scripts": [ + "./scripts/docker/set-winrm-automatic.ps1", + "./scripts/docker/add-docker-group.ps1", + "./scripts/docker/install-docker.ps1", + "./scripts/docker/docker-pull.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": "powershell" + }, + { + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" + }, + { + "scripts": [ + "./scripts/compile-dotnet-assemblies.bat", + "./scripts/compact.bat" + ], + "type": "windows-shell" + } + ], + "variables": { + "autounattend": "./answer_files/server_1909/Autounattend.xml", + "disk_size": "61440", + "disk_type_id": "1", + "not_found_docker_images": "mcr.microsoft.com/windows/nanoserver:1909 mcr.microsoft.com/windows/servercore:1909 mcr.microsoft.com/windows:1909", + "docker_images": "", + "docker_provider": "ee", + "docker_version": "19.03.5", + "headless": "false", + "iso_checksum": "62256AE2D89C93990963185065B53E7806E0203E9EFCFBF15E2FAFB3FA31FE84", + "iso_checksum_type": "sha256", + "iso_url": "https://download.my.visualstudio.com/db/en_windows_server_version_1909_x64_dvd_894c6446.iso", + "manually_download_iso_from": "https://my.visualstudio.com/Downloads?q=Windows%20Server,%20version%201909", + "restart_timeout": "5m", + "vhv_enable": "true", + "winrm_timeout": "2h" + } +} + diff --git a/windows_server_insider.json b/windows_server_insider.json index 5f029491..520000cd 100644 --- a/windows_server_insider.json +++ b/windows_server_insider.json @@ -98,7 +98,7 @@ "keep_input_artifact": false, "output": "windows_server_insider_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [ diff --git a/windows_server_insider_docker.json b/windows_server_insider_docker.json index 0792efb6..8b8a595a 100644 --- a/windows_server_insider_docker.json +++ b/windows_server_insider_docker.json @@ -98,7 +98,7 @@ "keep_input_artifact": false, "output": "windows_server_insider_docker_{{.Provider}}.box", "type": "vagrant", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + "vagrantfile_template": "vagrantfile-windows_2019_core.template" } ], "provisioners": [