windows_server_1709.json 5 KB
Newer Older
Stefan Scherer's avatar
Stefan Scherer committed
1
2
3
4
{
  "builders": [
    {
      "boot_wait": "60s",
5
6
7
8
9
      "communicator": "winrm",
      "cpu": 2,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
Stefan Scherer's avatar
Stefan Scherer committed
10
11
12
13
14
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
15
        "./scripts/enable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
16
17
18
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
19
20
21
22
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
Stefan Scherer's avatar
Stefan Scherer committed
23
      "ram_size": 2048,
24
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
Stefan Scherer's avatar
Stefan Scherer committed
25
      "switch_name": "{{user `hyperv_switchname`}}",
26
      "type": "hyperv-iso",
Stefan Scherer's avatar
Stefan Scherer committed
27
      "vm_name": "WindowsServer1709",
Stefan Scherer's avatar
Stefan Scherer committed
28
      "winrm_password": "vagrant",
29
      "winrm_timeout": "{{user `winrm_timeout`}}",
30
31
32
33
34
      "winrm_username": "vagrant"
    },
    {
      "boot_wait": "60s",
      "communicator": "winrm",
35
      "disk_size": "{{user `disk_size`}}",
Stefan Scherer's avatar
Stefan Scherer committed
36
37
38
39
40
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
41
        "./scripts/enable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
42
43
44
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1"
      ],
45
46
47
48
49
50
51
      "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",
52
      "version": 12,
53
      "vm_name": "WindowsServer1709",
Stefan Scherer's avatar
Stefan Scherer committed
54
55
56
57
58
59
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068",
60
        "vhv.enable": "{{user `vhv_enable`}}"
61
62
63
64
65
66
67
      },
      "vmx_remove_ethernet_interfaces": true,
      "vnc_port_max": 5980,
      "vnc_port_min": 5900,
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
Stefan Scherer's avatar
Stefan Scherer committed
68
69
70
    },
    {
      "boot_wait": "60s",
71
      "communicator": "winrm",
72
      "disk_size": "{{user `disk_size`}}",
Stefan Scherer's avatar
Stefan Scherer committed
73
74
75
76
77
      "floppy_files": [
        "{{user `autounattend`}}",
        "./floppy/WindowsPowershell.lnk",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
78
        "./scripts/enable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
79
        "./scripts/microsoft-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
80
        "./scripts/win-updates.ps1"
Stefan Scherer's avatar
Stefan Scherer committed
81
      ],
82
83
84
85
86
87
88
89
      "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",
Stefan Scherer's avatar
Stefan Scherer committed
90
      "vboxmanage": [
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
        [
          "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"
Stefan Scherer's avatar
Stefan Scherer committed
116
117
118
119
    }
  ],
  "provisioners": [
    {
Stefan Scherer's avatar
Stefan Scherer committed
120
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
121
122
123
124
125
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat"
      ],
      "type": "windows-shell"
Stefan Scherer's avatar
Stefan Scherer committed
126
127
    },
    {
128
129
130
131
      "scripts": [
        "./scripts/debloat-windows.ps1"
      ],
      "type": "powershell"
Stefan Scherer's avatar
Stefan Scherer committed
132
133
    },
    {
134
135
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
Stefan Scherer's avatar
Stefan Scherer committed
136
137
    },
    {
Stefan Scherer's avatar
Stefan Scherer committed
138
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
Stefan Scherer's avatar
Stefan Scherer committed
139
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
140
        "./scripts/set-winrm-automatic.bat",
Stefan Scherer's avatar
Stefan Scherer committed
141
        "./scripts/compile-dotnet-assemblies.bat",
Stefan Scherer's avatar
Stefan Scherer committed
142
        "./scripts/uac-enable.bat",
Stefan Scherer's avatar
Stefan Scherer committed
143
        "./scripts/compact.bat"
144
145
      ],
      "type": "windows-shell"
Stefan Scherer's avatar
Stefan Scherer committed
146
147
148
    }
  ],
  "variables": {
149
    "autounattend": "./answer_files/server_1709/Autounattend.xml",
150
151
    "disk_size": "61440",
    "disk_type_id": "1",
152
153
    "headless": "false",
    "iso_checksum": "ca1108d5be2c091bfb57e8f3db3be1e8baa9c32802131f7a6e43e63f7b596591",
Stefan Scherer's avatar
Stefan Scherer committed
154
    "iso_checksum_type": "sha256",
155
156
    "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",
157
    "restart_timeout": "5m",
158
    "vhv_enable": "false",
159
    "winrm_timeout": "2h"
Stefan Scherer's avatar
Stefan Scherer committed
160
161
  }
}
162