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