Commit 13df9ce2 authored by Bob Tanner's avatar Bob Tanner
parents 8aa6f9fe 291bde6a
......@@ -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 and 1809, all without and with Docker
* Windows Server 1709, 1803, 1809, and 1903 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
......
This diff is collapsed.
#!/bin/bash
# MSDN 1903 ISO
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 autounattend=./tmp/1903/Autounattend.xml \
windows_server_1903_docker.json
#"Remove" | Out-File C:\Users\vagrant\Desktop\delete-me-to-continue.txt
#while (Test-Path C:\Users\vagrant\Desktop\delete-me-to-continue.txt) {
# Start-Sleep 1
#}
Write-Host "Downloading nanoserver image"
docker import http://172.16.236.1:8080/CBaseOs_rs_prerelease_17035.1000.171103-1616_amd64fre_NanoServer_en-us.tar.gz microsoft/nanoserver-insider:latest
#Write-Host "Downloading windowsservercore image"
#docker import http://172.16.236.1:8080/CBaseOs_rs_prerelease_17035.1000.171103-1616_amd64fre_ServerDatacenterCore_en-us.tar.gz microsoft/windowsservercore-insider:latest
docker images
......@@ -3,7 +3,7 @@
{
"boot_wait": "6m",
"communicator": "winrm",
"cpu": "2",
"cpus": "2",
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": "2048",
"memory": "2048",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `switch_name`}}",
"type": "hyperv-iso",
......
......@@ -74,7 +74,7 @@
],
"boot_wait": "1s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -83,7 +83,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"secondary_iso_images": [
"./iso/windows_10_insider_unattend.iso"
],
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0m",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "a:/sysprep.bat",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0m",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "a:/sysprep.bat",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "a:/sysprep.bat",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"floppy_files": [
......@@ -18,7 +18,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"floppy_files": [
......@@ -18,7 +18,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......@@ -158,7 +158,7 @@
"autounattend": "./answer_files/2016_core/Autounattend.xml",
"disk_size": "61440",
"disk_type_id": "1",
"docker_images": "mcr.microsoft.com/windows/servercore:ltsc2016 mcr.microsoft.com/windows/nanoserver:sac2016",
"docker_images": "mcr.microsoft.com/windows/servercore:ltsc2016",
"docker_provider": "ee",
"docker_version": "18-09-5",
"headless": "false",
......
......@@ -58,7 +58,7 @@
"azure_ad_tenant_id": "{{env `PACKER_AZURE_AD_TENANT_ID`}}",
"azure_subscription_id": "{{env `PACKER_AZURE_SUBSCRIPTION_ID`}}",
"client_secret": "{{env `PACKER_AZURE_CLIENT_SECRET`}}",
"docker_images": "microsoft/windowsservercore microsoft/nanoserver",
"docker_images": "mcr.microsoft.com/windows/servercore:ltsc2016",
"docker_provider": "DockerProvider",
"docker_version": "stable",
"headless": "false",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"floppy_files": [
......@@ -17,7 +17,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "a:/sysprep.bat",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"floppy_files": [
......@@ -18,7 +18,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "0s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"differencing_disk": false,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
......@@ -23,7 +23,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "a:/sysprep.bat",
"skip_compaction": true,
"skip_export": true,
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -20,7 +20,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
......@@ -3,7 +3,7 @@
{
"boot_wait": "60s",
"communicator": "winrm",
"cpu": 2,
"cpus": 2,
"disk_size": "{{user `disk_size`}}",
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
......@@ -21,7 +21,7 @@
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `iso_url`}}",
"ram_size": 2048,
"memory": 2048,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "{{user `hyperv_switchname`}}",
"type": "hyperv-iso",
......
{
"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": "WindowsServer1903",
"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": "WindowsServer1903",
"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": "WindowsServer1903",
"winrm_password": "vagrant",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_server_1903_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_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_1903/Autounattend.xml",
"disk_size": "61440",
"disk_type_id": "1",
"headless": "false",
"iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be",
"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",
"restart_timeout": "5m",
"vhv_enable": "false",
"winrm_timeout": "2h"
}
}
<
{
"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": "WindowsServer1903Docker",
"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": "WindowsServer1903Docker",
"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": "WindowsServer1903Docker",
"winrm_password": "vagrant",
"winrm_timeout": "{{user `winrm_timeout`}}",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "windows_server_1903_docker_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_2016_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_1903/Autounattend.xml",
"disk_size": "61440",
"disk_type_id": "1",
"not_found_docker_images": "mcr.microsoft.com/windows/nanoserver:1903 mcr.microsoft.com/windows/servercore:1903 mcr.microsoft.com/windows:1903",
"docker_images": "",
"docker_provider": "ee",
"docker_version": "18-09-5",
"headless": "false",
"iso_checksum": "10a61364246f94ef2888b47a00d02b2f9fec8a94f0c745685416f4ba331cb4be",
"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",
"restart_timeout": "5m",