diff --git a/fix.sh b/fix.sh new file mode 100755 index 00000000..d9b04503 --- /dev/null +++ b/fix.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for template in $(ls -1 *.json); do + echo $template + packer fix $template >/tmp/$$.json + mv /tmp/$$.json $template +done diff --git a/windows_10.json b/windows_10.json index de6f281f..d4e51728 100644 --- a/windows_10.json +++ b/windows_10.json @@ -1,21 +1,9 @@ { "builders": [ { - "type": "hyperv-iso", - "vm_name":"windows_10", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", "boot_wait": "6m", - "communicator":"winrm", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout" : "{{user `winrm_timeout`}}", - "ram_size": "2048", + "communicator": "winrm", "cpu": "2", - "switch_name": "{{user `switch_name`}}", - "guest_additions_mode": "none", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -27,28 +15,26 @@ "./scripts/enable-winrm.ps1", "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" - ] + ], + "guest_additions_mode": "none", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "ram_size": "2048", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `switch_name`}}", + "type": "hyperv-iso", + "vm_name": "windows_10", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "type": "vmware-iso", - "vm_name":"windows_10", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `headless`}}", - "boot_wait": "6m", "boot_command": "", - "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": "windows9-64", + "boot_wait": "6m", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "version": 11, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -60,31 +46,33 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows9-64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 11, + "vm_name": "windows_10", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "type": "virtualbox-iso", - "vm_name":"windows_10", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `headless`}}", - "boot_wait": "6m", "boot_command": "", - "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": "Windows10_64", - "guest_additions_mode": "disable", + "boot_wait": "6m", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -97,6 +85,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows10_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -110,67 +106,72 @@ "--cpus", "2" ] - ] + ], + "vm_name": "windows_10", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_10_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_10.template" } ], "provisioners": [ { - "type": "windows-shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/set-powerplan.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/pin-powershell.bat", "./scripts/set-winrm-automatic.bat", "./scripts/uac-enable.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_10_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_10.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/10/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "false", - "iso_url": "http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_checksum_type": "sha256", + "headless": "false", "iso_checksum": "3d39dd9bd37db5b3c80801ae44003802a9c770a7400a1b33027ca474a1a7c691", - "autounattend": "./answer_files/10/Autounattend.xml", + "iso_checksum_type": "sha256", + "iso_url": "http://care.dlservice.microsoft.com/dl/download/6/5/D/65D18931-F626-4A35-AD5B-F5DA41FE6B76/16299.15.170928-1534.rs3_release_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "6h" } } + diff --git a/windows_10_docker.json b/windows_10_docker.json index ebb2c3bf..db634778 100644 --- a/windows_10_docker.json +++ b/windows_10_docker.json @@ -1,41 +1,48 @@ { "builders": [ { - "type": "vmware-vmx", - "vm_name": "windows_10_docker", + "boot_command": "", + "boot_wait": "5s", "communicator": "winrm", - "source_path": "{{user `source_path`}}", "headless": false, - "boot_wait": "5s", - "boot_command": "", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout": "15m", "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "vmx_remove_ethernet_interfaces": true, + "source_path": "{{user `source_path`}}", + "type": "vmware-vmx", + "vm_name": "windows_10_docker", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "15m", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_10_docker_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_10.template" } ], "provisioners": [ { - "type": "powershell", "scripts": [ "./scripts/docker/10/install-containers-feature.ps1" - ] + ], + "type": "powershell" }, { "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/docker/add-docker-group.ps1", "./scripts/docker/10/install-docker.ps1", @@ -44,26 +51,20 @@ "./scripts/docker/open-docker-swarm-ports.ps1", "./scripts/docker/remove-docker-key-json.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", "scripts": [ "./scripts/uac-enable.bat", "./scripts/set-winrm-automatic.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_10_docker_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_10.template" + ], + "type": "windows-shell" } ], "variables": { "source_path": "path-to.vmx" } } + diff --git a/windows_10_insider.json b/windows_10_insider.json index ae3911d5..b7796cf0 100644 --- a/windows_10_insider.json +++ b/windows_10_insider.json @@ -1,23 +1,10 @@ { "builders": [ { - "type": "vmware-iso", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": false, - "boot_wait": "6m", "boot_command": "", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout": "2h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "windows9-64", + "boot_wait": "6m", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "version": 11, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -29,30 +16,32 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows9-64", + "headless": false, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 11, "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "2h", + "winrm_username": "vagrant" }, { - "type": "virtualbox-iso", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": false, - "boot_wait": "6m", "boot_command": "", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout": "2h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows10_64", - "guest_additions_mode": "disable", + "boot_wait": "6m", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -65,6 +54,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows10_64", + "headless": false, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -78,21 +75,18 @@ "--cpus", "2" ] - ] + ], + "winrm_password": "vagrant", + "winrm_timeout": "2h", + "winrm_username": "vagrant" }, { - "type": "hyperv-iso", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout": "2h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "communicator": "winrm", + "cpu": 2, "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -104,66 +98,73 @@ "./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`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true, - "enable_virtualization_extensions":true + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "winrm_password": "vagrant", + "winrm_timeout": "2h", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_10_insider_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_10.template" } ], "provisioners": [ { - "type": "windows-shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat", "./scripts/enable-uac.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/set-powerplan.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/pin-powershell.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/set-winrm-automatic.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_10_insider_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_10.template" + ], + "type": "windows-shell" } ], "variables": { - "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewadvanced", - "iso_url": "https://software-download.microsoft.com/pr/Windows10_InsiderPreview_EnterpriseVL_x64_en-us_16251.iso", - "iso_checksum_type": "sha256", - "iso_checksum": "CA0715B5646FBD18376F9A370BB1A2DF8A94DDB3F1BF107843C357E7DAD417FF", "autounattend": "./answer_files/10_insider/Autounattend.xml", - "disk_size": "61440" + "disk_size": "61440", + "iso_checksum": "CA0715B5646FBD18376F9A370BB1A2DF8A94DDB3F1BF107843C357E7DAD417FF", + "iso_checksum_type": "sha256", + "iso_url": "https://software-download.microsoft.com/pr/Windows10_InsiderPreview_EnterpriseVL_x64_en-us_16251.iso", + "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewadvanced" } } + diff --git a/windows_2008_r2.json b/windows_2008_r2.json index 9823dcfd..1f4c42fd 100644 --- a/windows_2008_r2.json +++ b/windows_2008_r2.json @@ -1,21 +1,8 @@ { "builders": [ { - "type": "vmware-iso", - "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", - "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "6h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "windows7srv-64", - "tools_upload_flavor": "windows", "disk_size": 131072, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "./answer_files/2008_r2/Autounattend.xml", "./scripts/dis-updates.ps1", @@ -23,27 +10,30 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows7srv-64", + "headless": true, + "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "6h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 }, { - "type": "virtualbox-iso", - "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", - "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", - "headless": false, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "6h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows2008_64", "disk_size": 131072, "floppy_files": [ "./answer_files/2008_r2/Autounattend.xml", @@ -52,6 +42,16 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], + "guest_os_type": "Windows2008_64", + "headless": false, + "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "6h", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -68,32 +68,33 @@ ] } ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2008_r2_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2008_r2.template" + } + ], "provisioners": [ { - "type": "shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", "./scripts/vagrant-ssh.bat", "./scripts/enable-rdp.bat", "./scripts/compact.bat" - ] + ], + "type": "shell" }, { - "type": "shell", "inline": [ "rm -rf /tmp/*" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2008_r2_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2008_r2.template" + ], + "type": "shell" } ] } + diff --git a/windows_2008_r2_core.json b/windows_2008_r2_core.json index 1fb4df08..b8c9f7c4 100644 --- a/windows_2008_r2_core.json +++ b/windows_2008_r2_core.json @@ -1,60 +1,81 @@ { - "builders": [{ - "type": "vmware-iso", - "iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", - "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", - "headless": true, - "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "windows7srv-64", - "tools_upload_flavor": "windows", - "disk_size": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "floppy_files": [ - "./answer_files/2008_r2_core/Autounattend.xml", - "./scripts/win-updates.ps1", - "./scripts/openssh.ps1" - ], - "vmx_remove_ethernet_interfaces": true, - "vmx_data": { - "RemoteDisplay.vnc.enabled": "false", - "RemoteDisplay.vnc.port": "5900", - "memsize": "2048", - "numvcpus": "2", - "scsi0.virtualDev": "lsisas1068" + "builders": [ + { + "boot_wait": "2m", + "disk_size": 61440, + "floppy_files": [ + "./answer_files/2008_r2_core/Autounattend.xml", + "./scripts/win-updates.ps1", + "./scripts/openssh.ps1" + ], + "guest_os_type": "windows7srv-64", + "headless": true, + "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", + "iso_checksum_type": "md5", + "iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "2h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", + "vmx_data": { + "RemoteDisplay.vnc.enabled": "false", + "RemoteDisplay.vnc.port": "5900", + "memsize": "2048", + "numvcpus": "2", + "scsi0.virtualDev": "lsisas1068" + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 + }, + { + "boot_wait": "2m", + "disk_size": 61440, + "floppy_files": [ + "./answer_files/2008_r2_core/Autounattend.xml", + "./scripts/win-updates.ps1", + "./scripts/openssh.ps1" + ], + "guest_os_type": "Windows2008_64", + "headless": true, + "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", + "iso_checksum_type": "md5", + "iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "2h", + "type": "virtualbox-iso", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "2048" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ] } - }, { - "type": "virtualbox-iso", - "iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso", - "iso_checksum_type": "md5", - "iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5", - "headless": true, - "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows2008_64", - "disk_size": 61440, - "floppy_files": [ - "./answer_files/2008_r2_core/Autounattend.xml", - "./scripts/win-updates.ps1", - "./scripts/openssh.ps1" - ], - "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"] - ] - }], - "provisioners": [{ - "type": "shell", - "remote_path": "/tmp/script.bat", + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2008_r2_core_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2008_r2.template" + } + ], + "provisioners": [ + { "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", @@ -62,21 +83,15 @@ "./scripts/enable-rdp.bat", "./scripts/disable-auto-logon.bat", "./scripts/compact.bat" - ] + ], + "type": "shell" }, { - "type": "shell", "inline": [ "rm -rf /tmp/*" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2008_r2_core_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2008_r2.template" + ], + "type": "shell" } ] } + diff --git a/windows_2012.json b/windows_2012.json index 4d77562f..57db068f 100644 --- a/windows_2012.json +++ b/windows_2012.json @@ -1,48 +1,38 @@ { "builders": [ { - "type": "vmware-iso", - "iso_url": "http://download.microsoft.com/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "2h", - "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": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "./answer_files/2012/Autounattend.xml", "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows8srv-64", + "headless": true, + "iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "2h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 }, { - "type": "virtualbox-iso", - "iso_url": "http://download.microsoft.com/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "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", "disk_size": 61440, "floppy_files": [ "./answer_files/2012/Autounattend.xml", @@ -50,6 +40,16 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], + "guest_os_type": "Windows2012_64", + "headless": true, + "iso_checksum": "8503997171f731d9bd1cb0b0edc31f3d", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/6/D/A/6DAB58BA-F939-451D-9101-7DE07DC09C03/9200.16384.WIN8_RTM.120725-1247_X64FRE_SERVER_EVAL_EN-US-HRM_SSS_X64FREE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "2h", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -66,32 +66,33 @@ ] } ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2012_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2012.template" + } + ], "provisioners": [ { - "type": "shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", "./scripts/vagrant-ssh.bat", "./scripts/disable-auto-logon.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "shell" }, { - "type": "shell", "inline": [ "rm -rf /tmp/*" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2012_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2012.template" + ], + "type": "shell" } ] } + diff --git a/windows_2012_r2.json b/windows_2012_r2.json index a93e4315..c0b2e738 100644 --- a/windows_2012_r2.json +++ b/windows_2012_r2.json @@ -1,23 +1,9 @@ { "builders": [ { - "type": "vmware-iso", - "vm_name":"windows_2012_r2", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": true, "boot_wait": "2m", - "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", + "communicator": "winrm", "disk_size": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "skip_compaction": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", @@ -26,30 +12,32 @@ "./scripts/unattend.xml", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows8srv-64", + "headless": true, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "skip_compaction": true, + "type": "vmware-iso", + "vm_name": "windows_2012_r2", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "6h", + "winrm_username": "vagrant" }, { - "type": "virtualbox-iso", - "vm_name":"windows_2012_r2", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": true, "boot_wait": "2m", - "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", - "guest_additions_mode": "disable", + "communicator": "winrm", "disk_size": 61440, "floppy_files": [ "{{user `autounattend`}}", @@ -59,6 +47,14 @@ "./scripts/unattend.xml", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": true, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -72,32 +68,37 @@ "--cpus", "2" ] - ] + ], + "vm_name": "windows_2012_r2", + "winrm_password": "vagrant", + "winrm_timeout": "6h", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2012_r2_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2012_r2.template" } ], "provisioners": [ { - "type": "windows-shell", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2012_r2_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2012_r2.template" + ], + "type": "windows-shell" } ], "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", + "autounattend": "./answer_files/2012_r2/Autounattend.xml", "iso_checksum": "5b5e08c490ad16b59b1d9fab0def883a", - "autounattend": "./answer_files/2012_r2/Autounattend.xml" + "iso_checksum_type": "md5", + "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" } } + diff --git a/windows_2012_r2_core.json b/windows_2012_r2_core.json index 0e76b03b..74f53827 100644 --- a/windows_2012_r2_core.json +++ b/windows_2012_r2_core.json @@ -1,21 +1,9 @@ { "builders": [ { - "type": "vmware-iso", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": true, "boot_wait": "2m", - "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", + "communicator": "winrm", "disk_size": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", @@ -23,29 +11,30 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows8srv-64", + "headless": true, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "6h", + "winrm_username": "vagrant" }, { - "type": "virtualbox-iso", - "communicator": "winrm", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", - "headless": true, "boot_wait": "2m", - "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", - "guest_additions_mode": "disable", + "communicator": "winrm", "disk_size": 61440, "floppy_files": [ "{{user `autounattend`}}", @@ -54,6 +43,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": true, + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -67,33 +64,37 @@ "--cpus", "2" ] - ] + ], + "winrm_password": "vagrant", + "winrm_timeout": "6h", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2012_r2_core_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2012_r2.template" } ], "provisioners": [ { - "type": "windows-shell", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/disable-auto-logon.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2012_r2_core_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2012_r2.template" + ], + "type": "windows-shell" } ], "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", + "autounattend": "./answer_files/2012_r2_core/Autounattend.xml", "iso_checksum": "5b5e08c490ad16b59b1d9fab0def883a", - "autounattend": "./answer_files/2012_r2_core/Autounattend.xml" + "iso_checksum_type": "md5", + "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" } } + diff --git a/windows_2012_r2_hyperv.json b/windows_2012_r2_hyperv.json index 78043c5f..c72140f6 100644 --- a/windows_2012_r2_hyperv.json +++ b/windows_2012_r2_hyperv.json @@ -1,48 +1,38 @@ { "builders": [ { - "type": "vmware-iso", - "iso_url": "http://care.dlservice.microsoft.com/dl/download/F/7/D/F7DF966B-5C40-4674-9A32-D83D869A3244/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVERHYPERCORE_EN-US-IRM_SHV_X64FRE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "9c9e0d82cb6301a4b88fd2f4c35caf80", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_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": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "./answer_files/2012_r2_hyperv/Autounattend.xml", "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows8srv-64", + "headless": true, + "iso_checksum": "9c9e0d82cb6301a4b88fd2f4c35caf80", + "iso_checksum_type": "md5", + "iso_url": "http://care.dlservice.microsoft.com/dl/download/F/7/D/F7DF966B-5C40-4674-9A32-D83D869A3244/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVERHYPERCORE_EN-US-IRM_SHV_X64FRE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "6h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 }, { - "type": "virtualbox-iso", - "iso_url": "http://care.dlservice.microsoft.com/dl/download/F/7/D/F7DF966B-5C40-4674-9A32-D83D869A3244/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVERHYPERCORE_EN-US-IRM_SHV_X64FRE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "9c9e0d82cb6301a4b88fd2f4c35caf80", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "6h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows2012_64", "disk_size": 61440, "floppy_files": [ "./answer_files/2012_r2_hyperv/Autounattend.xml", @@ -50,6 +40,16 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], + "guest_os_type": "Windows2012_64", + "headless": true, + "iso_checksum": "9c9e0d82cb6301a4b88fd2f4c35caf80", + "iso_checksum_type": "md5", + "iso_url": "http://care.dlservice.microsoft.com/dl/download/F/7/D/F7DF966B-5C40-4674-9A32-D83D869A3244/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVERHYPERCORE_EN-US-IRM_SHV_X64FRE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "6h", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -66,11 +66,18 @@ ] } ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2012_r2_hyperv_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2012_r2.template" + } + ], "provisioners": [ { - "type": "shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", @@ -79,21 +86,15 @@ "./scripts/compile-dotnet-assemblies.bat", "./scripts/disable-auto-logon.bat", "./scripts/compact.bat" - ] + ], + "type": "shell" }, { - "type": "shell", "inline": [ "rm -rf /tmp/*" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2012_r2_hyperv_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2012_r2.template" + ], + "type": "shell" } ] } + diff --git a/windows_2016.json b/windows_2016.json index 3392cf20..3245228b 100644 --- a/windows_2016.json +++ b/windows_2016.json @@ -1,14 +1,12 @@ { "builders": [ { - "vm_name":"WindowsServer2016", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -19,36 +17,24 @@ "./scripts/sysprep.bat", "./scripts/win-updates.ps1" ], - "communicator":"winrm", - "winrm_username": "vagrant", - "winrm_password": "vagrant", - "winrm_timeout" : "{{user `winrm_timeout`}}", - "shutdown_command": "a:/sysprep.bat", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true, - "enable_virtualization_extensions":true + "shutdown_command": "a:/sysprep.bat", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "WindowsServer2016", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name":"WindowsServer2016", - "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": "a:/sysprep.bat", - "guest_os_type": "windows9srv-64", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "version": 11, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -59,30 +45,32 @@ "./scripts/sysprep.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "a:/sysprep.bat", + "type": "vmware-iso", + "version": 11, + "vm_name": "WindowsServer2016", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name":"WindowsServer2016", - "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": "a:/sysprep.bat", - "guest_os_type": "Windows2012_64", - "guest_additions_mode": "disable", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -94,6 +82,14 @@ "./scripts/unattend.xml", "./scripts/sysprep.bat" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "a:/sysprep.bat", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -107,30 +103,41 @@ "--cpus", "2" ] - ] + ], + "vm_name": "WindowsServer2016", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2016_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016.template" } ], "provisioners": [ { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "scripts": [ "./scripts/pin-powershell.bat", @@ -139,27 +146,21 @@ "./scripts/compile-dotnet-assemblies.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2016_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/2016/Autounattend.xml", "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/Autounattend.xml", + "headless": "false", "hyperv_switchname": "{{env `hyperv_switchname`}}", + "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F", + "iso_checksum_type": "md5", + "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", "restart_timeout": "5m", "winrm_timeout": "2h" } } + diff --git a/windows_2016_core.json b/windows_2016_core.json index f06eeb04..39bf32a6 100644 --- a/windows_2016_core.json +++ b/windows_2016_core.json @@ -1,14 +1,11 @@ { "builders": [ { - "vm_name":"WindowsServer2016Core", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -17,33 +14,24 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "WindowsServer2016Core", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -52,29 +40,30 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -84,6 +73,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -97,50 +94,54 @@ "--cpus", "2" ] - ] + ], + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2016_core_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/uac-enable.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2016_core_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/2016_core/Autounattend.xml", "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", + "headless": "false", "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F", - "autounattend": "./answer_files/2016_core/Autounattend.xml", + "iso_checksum_type": "md5", + "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", "winrm_timeout": "6h" } } + diff --git a/windows_2016_dc.json b/windows_2016_dc.json index 61b0d9e0..762060a2 100644 --- a/windows_2016_dc.json +++ b/windows_2016_dc.json @@ -1,14 +1,11 @@ { "builders": [ { - "vm_name":"windows_2016_dc", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -17,34 +14,24 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "windows_2016_dc", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name":"windows_2016_dc", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -53,30 +40,31 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "vm_name": "windows_2016_dc", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name":"windows_2016_dc", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -86,6 +74,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -99,19 +95,30 @@ "--cpus", "2" ] - ] + ], + "vm_name": "windows_2016_dc", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2016_dc_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "inline": [ "Install-WindowsFeature AD-Domain-Services", "Import-Module ADDSDeployment", @@ -125,53 +132,47 @@ " -SafeModeAdministratorPassword (ConvertTo-SecureString `", " -String \"{{user `SafeModeAdministratorPassword`}}\" `", " -AsPlainText -Force) -Force:$true" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "windows-shell", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/uac-enable.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2016_dc_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "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", "DomainName": "windomain.local", "DomainNetbiosName": "windom", "SafeModeAdministratorPassword": "BadAdminPassword!", + "autounattend": "./answer_files/2016_core/Autounattend.xml", + "disk_size": "61440", + "disk_type_id": "1", + "headless": "false", + "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F", + "iso_checksum_type": "md5", + "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", "restart_timeout": "5m", "winrm_timeout": "6h" } } + diff --git a/windows_2016_docker.json b/windows_2016_docker.json index 1a70bd5d..fce7d1bc 100644 --- a/windows_2016_docker.json +++ b/windows_2016_docker.json @@ -1,14 +1,12 @@ { "builders": [ { - "vm_name":"WindowsServer2016Docker", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -18,36 +16,24 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true, - "enable_virtualization_extensions":true + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "WindowsServer2016Docker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name":"WindowsServer2016Docker", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, - "version": 11, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", @@ -57,7 +43,15 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 11, + "vm_name": "WindowsServer2016Docker", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", @@ -65,24 +59,17 @@ "numvcpus": "2", "scsi0.virtualDev": "lsisas1068", "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" }, { - "vm_name":"WindowsServer2016Docker", - "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\"", - "post_shutdown_delay": "10s", - "guest_os_type": "Windows2012_64", - "guest_additions_mode": "disable", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -93,6 +80,15 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "post_shutdown_delay": "10s", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -106,30 +102,41 @@ "--cpus", "2" ] - ] + ], + "vm_name": "WindowsServer2016Docker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2016_docker_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/docker/add-docker-group.ps1", "./scripts/docker/set-winrm-automatic.ps1", @@ -139,37 +146,31 @@ "./scripts/docker/open-docker-swarm-ports.ps1", "./scripts/docker/remove-docker-key-json.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/uac-enable.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2016_docker_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/2016_core/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "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", + "headless": "false", "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F", - "autounattend": "./answer_files/2016_core/Autounattend.xml", + "iso_checksum_type": "md5", + "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", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "6h" } } + diff --git a/windows_2016_docker_azure.json b/windows_2016_docker_azure.json index 20febbe7..c68f023a 100644 --- a/windows_2016_docker_azure.json +++ b/windows_2016_docker_azure.json @@ -1,64 +1,62 @@ { - "variables": { - "headless": "false", - "azure_ad_tenant_id": "{{env `PACKER_AZURE_AD_TENANT_ID`}}", - "azure_subscription_id": "{{env `PACKER_AZURE_SUBSCRIPTION_ID`}}", - "object_id": "{{env `PACKER_AZURE_OBJECT_ID`}}", - "app_id": "{{env `PACKER_AZURE_APP_ID`}}", - "client_secret": "{{env `PACKER_AZURE_CLIENT_SECRET`}}", - "resource_group": "{{env `PACKER_AZURE_RESOURCE_GROUP`}}", - "storage_account": "{{env `PACKER_AZURE_STORAGE_ACCOUNT`}}" - }, "builders": [ { - "type": "azure-arm", - "subscription_id": "{{user `azure_subscription_id`}}", - "tenant_id": "{{user `azure_ad_tenant_id`}}", - "object_id": "{{user `object_id`}}", + "capture_container_name": "images", + "capture_name_prefix": "WindowsServer2016Docker", "client_id": "{{user `app_id`}}", "client_secret": "{{user `client_secret`}}", - "resource_group_name": "{{user `resource_group`}}", - "cloud_environment_name": "Public", - "location": "West Europe", - "vm_size": "Standard_D2_v2", - - "storage_account": "{{user `storage_account`}}", - "capture_container_name": "images", - "capture_name_prefix": "WindowsServer2016Docker", - - "os_type": "Windows", - "image_publisher": "MicrosoftWindowsServer", + "communicator": "winrm", "image_offer": "WindowsServer", + "image_publisher": "MicrosoftWindowsServer", "image_sku": "2016-Datacenter", "image_version": "latest", - - "communicator": "winrm", - "winrm_use_ssl": "true", + "location": "West Europe", + "object_id": "{{user `object_id`}}", + "os_type": "Windows", + "resource_group_name": "{{user `resource_group`}}", + "storage_account": "{{user `storage_account`}}", + "subscription_id": "{{user `azure_subscription_id`}}", + "tenant_id": "{{user `azure_ad_tenant_id`}}", + "type": "azure-arm", + "vm_size": "Standard_D2_v2", "winrm_insecure": "true", "winrm_timeout": "3m", + "winrm_use_ssl": "true", "winrm_username": "packer" } ], + "post-processors": [], "provisioners": [ { - "type": "powershell", "scripts": [ "./scripts/docker/2016/install-containers-feature.ps1" - ] + ], + "type": "powershell" }, { "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/docker/add-docker-group.ps1", "./scripts/docker/disable-windows-defender.ps1", "./scripts/docker/2016/install-docker.ps1", "./scripts/docker/docker-pull-async.ps1", "./scripts/docker/remove-docker-key-json.ps1" - ] + ], + "type": "powershell" } - ] + ], + "variables": { + "app_id": "{{env `PACKER_AZURE_APP_ID`}}", + "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`}}", + "headless": "false", + "object_id": "{{env `PACKER_AZURE_OBJECT_ID`}}", + "resource_group": "{{env `PACKER_AZURE_RESOURCE_GROUP`}}", + "storage_account": "{{env `PACKER_AZURE_STORAGE_ACCOUNT`}}" + } } + diff --git a/windows_2016_hyperv.json b/windows_2016_hyperv.json index d2101588..5d6f500d 100644 --- a/windows_2016_hyperv.json +++ b/windows_2016_hyperv.json @@ -1,14 +1,11 @@ { "builders": [ { - "vm_name":"HyperVServer2016", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "0s", - "guest_additions_mode":"disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", @@ -16,33 +13,24 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, - "switch_name":"{{user `hyperv_switchname`}}", - "enable_secure_boot":true + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "switch_name": "{{user `hyperv_switchname`}}", + "type": "hyperv-iso", + "vm_name": "HyperVServer2016", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", @@ -50,29 +38,30 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -81,6 +70,14 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -94,50 +91,54 @@ "--cpus", "2" ] - ] + ], + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_2016_hyperv_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016.template" } ], "provisioners": [ { - "type": "windows-shell", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat" - ] + ], + "type": "windows-shell" }, { - "type": "powershell", "scripts": [ "./scripts/debloat-windows.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-shell", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/uac-enable.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/dis-updates.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_2016_hyperv_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/2016_hyperv/Autounattend.xml", "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", + "headless": "false", "iso_checksum": "53e2f01dc4077192a85f60f8d2ffb02189074e19b25f990cbe9eb767328d3fb6", - "autounattend": "./answer_files/2016_hyperv/Autounattend.xml", + "iso_checksum_type": "sha256", + "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", "winrm_timeout": "6h" } } + diff --git a/windows_7.json b/windows_7.json index 3870a825..a4dba015 100644 --- a/windows_7.json +++ b/windows_7.json @@ -1,21 +1,8 @@ { "builders": [ { - "type": "vmware-iso", - "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, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "8h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "windows7-64", - "tools_upload_flavor": "windows", "disk_size": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "./answer_files/7/Autounattend.xml", "./scripts/dis-updates.ps1", @@ -23,27 +10,30 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows7-64", + "headless": false, + "iso_checksum": "1d0d239a252cb53e466d39e752b17c28", + "iso_checksum_type": "md5", + "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", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "8h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 }, { - "type": "virtualbox-iso", - "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, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "8h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows7_64", "disk_size": 61440, "floppy_files": [ "./answer_files/7/Autounattend.xml", @@ -52,6 +42,16 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], + "guest_os_type": "Windows7_64", + "headless": false, + "iso_checksum": "1d0d239a252cb53e466d39e752b17c28", + "iso_checksum_type": "md5", + "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", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "8h", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -98,11 +98,18 @@ ] } ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_7_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_7.template" + } + ], "provisioners": [ { - "type": "shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", @@ -112,15 +119,9 @@ "./scripts/disable-tasks.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_7_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_7.template" + ], + "type": "shell" } ] } + diff --git a/windows_81.json b/windows_81.json index b8f88f10..fbc78ca4 100644 --- a/windows_81.json +++ b/windows_81.json @@ -1,48 +1,38 @@ { "builders": [ { - "type": "vmware-iso", - "iso_url": "http://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "5e4ecb86fd8619641f1d58f96e8561ec", - "headless": true, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "4h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "windows8-64", - "tools_upload_flavor": "windows", "disk_size": 61440, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "./answer_files/81/Autounattend.xml", "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "guest_os_type": "windows8-64", + "headless": true, + "iso_checksum": "5e4ecb86fd8619641f1d58f96e8561ec", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "4h", + "tools_upload_flavor": "windows", + "type": "vmware-iso", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068" - } + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900 }, { - "type": "virtualbox-iso", - "iso_url": "http://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.ISO", - "iso_checksum_type": "md5", - "iso_checksum": "5e4ecb86fd8619641f1d58f96e8561ec", - "headless": false, "boot_wait": "2m", - "ssh_username": "vagrant", - "ssh_password": "vagrant", - "ssh_wait_timeout": "4h", - "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", - "guest_os_type": "Windows81_64", "disk_size": 61440, "floppy_files": [ "./answer_files/81/Autounattend.xml", @@ -50,6 +40,16 @@ "./scripts/win-updates.ps1", "./scripts/openssh.ps1" ], + "guest_os_type": "Windows81_64", + "headless": false, + "iso_checksum": "5e4ecb86fd8619641f1d58f96e8561ec", + "iso_checksum_type": "md5", + "iso_url": "http://download.microsoft.com/download/B/9/9/B999286E-0A47-406D-8B3D-5B5AD7373A4A/9600.16384.WINBLUE_RTM.130821-1623_X64FRE_ENTERPRISE_EVAL_EN-US-IRM_CENA_X64FREE_EN-US_DV5.ISO", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "ssh_password": "vagrant", + "ssh_username": "vagrant", + "ssh_wait_timeout": "4h", + "type": "virtualbox-iso", "vboxmanage": [ [ "modifyvm", @@ -90,11 +90,18 @@ ] } ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_81_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_81.template" + } + ], "provisioners": [ { - "type": "shell", - "remote_path": "/tmp/script.bat", "execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat", + "remote_path": "/tmp/script.bat", "scripts": [ "./scripts/vm-guest-tools.bat", "./scripts/chef.bat", @@ -103,21 +110,15 @@ "./scripts/enable-rdp.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/compact.bat" - ] + ], + "type": "shell" }, { - "type": "shell", "inline": [ "rm -rf /tmp/*" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_81_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_81.template" + ], + "type": "shell" } ] } + diff --git a/windows_server_1709.json b/windows_server_1709.json index 57fccdbd..25f88135 100644 --- a/windows_server_1709.json +++ b/windows_server_1709.json @@ -1,14 +1,12 @@ { "builders": [ { - "vm_name": "WindowsServer1709", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "60s", - "guest_additions_mode": "disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -18,37 +16,23 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "switch_name": "{{user `hyperv_switchname`}}", - "enable_secure_boot": true, - "enable_virtualization_extensions": true - }, - { + "type": "hyperv-iso", "vm_name": "WindowsServer1709", - "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": "60s", - "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", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", - "version": 11, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -58,7 +42,15 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 11, + "vm_name": "WindowsServer1709", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", @@ -66,24 +58,17 @@ "numvcpus": "2", "scsi0.virtualDev": "lsisas1068", "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" }, { - "vm_name": "WindowsServer1709", - "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": "60s", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -94,59 +79,84 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"] - ] + [ + "modifyvm", + "{{.Name}}", + "--memory", + "2048" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ], + "vm_name": "WindowsServer1709", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_1709_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", - "scripts": ["./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat"] + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" }, { - "type": "powershell", - "scripts": ["./scripts/debloat-windows.ps1"] + "scripts": [ + "./scripts/debloat-windows.ps1" + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/uac-enable.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_server_1709_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/server_1709/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "false", - "manually_download_iso_from": - "https://my.visualstudio.com/downloads?pid=2347", - "iso_url": - "https://software-download.microsoft.com/pr/en_windows_server_version_1709_x64_dvd_100090904.iso", + "headless": "false", + "iso_checksum": "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591", "iso_checksum_type": "sha256", - "iso_checksum": - "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591", - "autounattend": "./answer_files/server_1709/Autounattend.xml", + "iso_url": "https://software-download.microsoft.com/pr/en_windows_server_version_1709_x64_dvd_100090904.iso", + "manually_download_iso_from": "https://my.visualstudio.com/downloads?pid=2347", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "2h" } } + diff --git a/windows_server_1709_docker.json b/windows_server_1709_docker.json index 1a29aa59..a7f2fe7f 100644 --- a/windows_server_1709_docker.json +++ b/windows_server_1709_docker.json @@ -1,14 +1,12 @@ { "builders": [ { - "vm_name": "WindowsServer1709Docker", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "60s", - "guest_additions_mode": "disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -19,38 +17,24 @@ "./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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "switch_name": "{{user `hyperv_switchname`}}", - "enable_secure_boot": true, - "enable_virtualization_extensions": true - }, - { + "type": "hyperv-iso", "vm_name": "WindowsServer1709Docker", - "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": "60s", - "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", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "version": 11, - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./floppy/WindowsPowershell.lnk", @@ -61,7 +45,15 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "version": 11, + "vm_name": "WindowsServer1709Docker", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", @@ -69,24 +61,17 @@ "numvcpus": "2", "scsi0.virtualDev": "lsisas1068", "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" }, { - "vm_name": "WindowsServer1709Docker", - "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": "60s", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -98,27 +83,61 @@ "./scripts/microsoft-updates.bat", "./scripts/win-updates.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"] - ] + [ + "modifyvm", + "{{.Name}}", + "--memory", + "2048" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ], + "vm_name": "WindowsServer1709Docker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_1709_docker_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", - "scripts": ["./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat"] + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" }, { - "type": "powershell", - "scripts": ["./scripts/docker/2016/install-containers-feature.ps1"] + "scripts": [ + "./scripts/docker/2016/install-containers-feature.ps1" + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/docker/add-docker-group.ps1", "./scripts/docker/set-winrm-automatic.ps1", @@ -128,42 +147,33 @@ "./scripts/docker/open-docker-swarm-ports.ps1", "./scripts/docker/remove-docker-key-json.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "windows-shell", "scripts": [ "./scripts/compile-dotnet-assemblies.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_server_1709_docker_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/server_1709/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "false", - "manually_download_iso_from": - "https://my.visualstudio.com/downloads?pid=2347", - "iso_url": - "https://software-download.microsoft.com/pr/en_windows_server_version_1709_x64_dvd_100090904.iso", + "headless": "false", + "iso_checksum": "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591", "iso_checksum_type": "sha256", - "iso_checksum": - "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591", - "autounattend": "./answer_files/server_1709/Autounattend.xml", + "iso_url": "https://software-download.microsoft.com/pr/en_windows_server_version_1709_x64_dvd_100090904.iso", + "manually_download_iso_from": "https://my.visualstudio.com/downloads?pid=2347", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "2h" } } + diff --git a/windows_server_insider.json b/windows_server_insider.json index 05cbb884..c2734ad2 100644 --- a/windows_server_insider.json +++ b/windows_server_insider.json @@ -1,83 +1,68 @@ { "builders": [ { - "vm_name": "WindowsServerInsider", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "60s", - "guest_additions_mode": "disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "switch_name": "{{user `hyperv_switchname`}}", - "enable_secure_boot": true, - "enable_virtualization_extensions": true - }, - { + "type": "hyperv-iso", "vm_name": "WindowsServerInsider", - "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": "60s", - "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", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "vm_name": "WindowsServerInsider", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068", - "virtualHW.version": "12", - "vhv.enable": "{{user `vhv_enable`}}" - } + "vhv.enable": "{{user `vhv_enable`}}", + "virtualHW.version": "12" + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name": "WindowsServerInsider", - "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": "60s", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -85,55 +70,78 @@ "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"] - ] + [ + "modifyvm", + "{{.Name}}", + "--memory", + "2048" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ], + "vm_name": "WindowsServerInsider", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_insider_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", - "scripts": ["./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat"] + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "windows-shell", "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"", "scripts": [ "./scripts/set-winrm-automatic.bat", "./scripts/compile-dotnet-assemblies.bat", "./scripts/uac-enable.bat", "./scripts/compact.bat" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_server_insider_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "windows-shell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/server_insider/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "false", - "manually_download_iso_from": - "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver", - "iso_url": - "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17035.iso", + "headless": "false", + "iso_checksum": "dd412bd5c7d29fa5166a10f4cb36dacf7fcb605a5b8e8a6e8fa87e13aed6851d", "iso_checksum_type": "sha256", - "iso_checksum": - "dd412bd5c7d29fa5166a10f4cb36dacf7fcb605a5b8e8a6e8fa87e13aed6851d", - "autounattend": "./answer_files/server_insider/Autounattend.xml", + "iso_url": "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17035.iso", + "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "2h" } } + diff --git a/windows_server_insider_docker.json b/windows_server_insider_docker.json index f9ccf60a..15562858 100644 --- a/windows_server_insider_docker.json +++ b/windows_server_insider_docker.json @@ -1,83 +1,68 @@ { "builders": [ { - "vm_name": "WindowsServerInsiderDocker", - "type": "hyperv-iso", - "disk_size": "{{user `disk_size`}}", "boot_wait": "60s", - "guest_additions_mode": "disable", - "iso_url": "{{user `iso_url`}}", - "iso_checksum_type": "{{user `iso_checksum_type`}}", - "iso_checksum": "{{user `iso_checksum`}}", + "communicator": "winrm", + "cpu": 2, + "disk_size": "{{user `disk_size`}}", + "enable_secure_boot": true, + "enable_virtualization_extensions": true, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-screensaver.ps1", "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.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\"", + "guest_additions_mode": "disable", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", "ram_size": 2048, - "cpu": 2, + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", "switch_name": "{{user `hyperv_switchname`}}", - "enable_secure_boot": true, - "enable_virtualization_extensions": true - }, - { + "type": "hyperv-iso", "vm_name": "WindowsServerInsiderDocker", - "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": "60s", - "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", + "winrm_username": "vagrant" + }, + { + "boot_wait": "60s", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "disk_type_id": "{{user `disk_type_id`}}", - "vnc_port_min": 5900, - "vnc_port_max": 5980, "floppy_files": [ "{{user `autounattend`}}", "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.ps1" ], - "vmx_remove_ethernet_interfaces": true, + "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`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "vmware-iso", + "vm_name": "WindowsServerInsiderDocker", "vmx_data": { "RemoteDisplay.vnc.enabled": "false", "RemoteDisplay.vnc.port": "5900", "memsize": "2048", "numvcpus": "2", "scsi0.virtualDev": "lsisas1068", - "virtualHW.version": "12", - "vhv.enable": "{{user `vhv_enable`}}" - } + "vhv.enable": "{{user `vhv_enable`}}", + "virtualHW.version": "12" + }, + "vmx_remove_ethernet_interfaces": true, + "vnc_port_max": 5980, + "vnc_port_min": 5900, + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" }, { - "vm_name": "WindowsServerInsiderDocker", - "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": "60s", - "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", + "communicator": "winrm", "disk_size": "{{user `disk_size`}}", "floppy_files": [ "{{user `autounattend`}}", @@ -85,27 +70,61 @@ "./scripts/disable-winrm.ps1", "./scripts/enable-winrm.ps1" ], + "guest_additions_mode": "disable", + "guest_os_type": "Windows2012_64", + "headless": "{{user `headless`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", + "type": "virtualbox-iso", "vboxmanage": [ - ["modifyvm", "{{.Name}}", "--memory", "2048"], - ["modifyvm", "{{.Name}}", "--cpus", "2"] - ] + [ + "modifyvm", + "{{.Name}}", + "--memory", + "2048" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "2" + ] + ], + "vm_name": "WindowsServerInsiderDocker", + "winrm_password": "vagrant", + "winrm_timeout": "{{user `winrm_timeout`}}", + "winrm_username": "vagrant" + } + ], + "post-processors": [ + { + "keep_input_artifact": false, + "output": "windows_server_insider_docker_{{.Provider}}.box", + "type": "vagrant", + "vagrantfile_template": "vagrantfile-windows_2016_core.template" } ], "provisioners": [ { - "type": "windows-shell", - "scripts": ["./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat"] + "scripts": [ + "./scripts/vm-guest-tools.bat", + "./scripts/enable-rdp.bat" + ], + "type": "windows-shell" }, { - "type": "powershell", - "scripts": ["./scripts/docker/2016/install-containers-feature.ps1"] + "scripts": [ + "./scripts/docker/2016/install-containers-feature.ps1" + ], + "type": "powershell" }, { - "type": "windows-restart", - "restart_timeout": "{{user `restart_timeout`}}" + "restart_timeout": "{{user `restart_timeout`}}", + "type": "windows-restart" }, { - "type": "powershell", "scripts": [ "./scripts/docker/add-docker-group.ps1", "./scripts/docker/2016/install-docker-ee-preview.ps1", @@ -114,31 +133,22 @@ "./scripts/docker/open-docker-swarm-ports.ps1", "./scripts/docker/remove-docker-key-json.ps1", "./scripts/docker/disable-windows-defender.ps1" - ] - } - ], - "post-processors": [ - { - "type": "vagrant", - "keep_input_artifact": false, - "output": "windows_server_insider_docker_{{.Provider}}.box", - "vagrantfile_template": "vagrantfile-windows_2016_core.template" + ], + "type": "powershell" } ], "variables": { - "headless": "false", + "autounattend": "./answer_files/server_insider/Autounattend.xml", "disk_size": "61440", "disk_type_id": "1", - "vhv_enable": "false", - "manually_download_iso_from": - "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver", - "iso_url": - "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17035.iso", + "headless": "false", + "iso_checksum": "dd412bd5c7d29fa5166a10f4cb36dacf7fcb605a5b8e8a6e8fa87e13aed6851d", "iso_checksum_type": "sha256", - "iso_checksum": - "dd412bd5c7d29fa5166a10f4cb36dacf7fcb605a5b8e8a6e8fa87e13aed6851d", - "autounattend": "./answer_files/server_insider/Autounattend.xml", + "iso_url": "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_17035.iso", + "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver", "restart_timeout": "5m", + "vhv_enable": "false", "winrm_timeout": "2h" } } +