windows_10.json 4.98 KB
Newer Older
1
2
{
  "builders": [
Pascal Beutels's avatar
Pascal Beutels committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    {
      "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" : "4h",
      "ram_size": "2048",
      "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`}}",
        "./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"
      ]
    },
32
33
    {
      "type": "vmware-iso",
Stefan Scherer's avatar
Stefan Scherer committed
34
      "vm_name":"windows_10",
Stefan Scherer's avatar
Stefan Scherer committed
35
36
37
38
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
39
      "headless": false,
Stefan Scherer's avatar
Stefan Scherer committed
40
      "boot_wait": "6m",
Stefan Scherer's avatar
Stefan Scherer committed
41
      "boot_command": "",
Stefan Scherer's avatar
Stefan Scherer committed
42
43
44
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
45
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
46
      "guest_os_type": "windows9-64",
Stefan Scherer's avatar
Stefan Scherer committed
47
      "disk_size": "{{user `disk_size`}}",
48
49
      "vnc_port_min": 5900,
      "vnc_port_max": 5980,
50
      "version": 11,
51
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
52
        "{{user `autounattend`}}",
53
        "./floppy/WindowsPowershell.lnk",
Stefan Scherer's avatar
Stefan Scherer committed
54
        "./floppy/PinTo10.exe",
55
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
56
        "./scripts/disable-screensaver.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
57
58
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
59
        "./scripts/microsoft-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
60
        "./scripts/win-updates.ps1"
61
62
63
64
65
66
67
68
69
70
71
      ],
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068"
      }
    },
    {
      "type": "virtualbox-iso",
Stefan Scherer's avatar
Stefan Scherer committed
72
      "vm_name":"windows_10",
Stefan Scherer's avatar
Stefan Scherer committed
73
74
75
76
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
77
      "headless": false,
Stefan Scherer's avatar
Stefan Scherer committed
78
      "boot_wait": "6m",
Stefan Scherer's avatar
Stefan Scherer committed
79
      "boot_command": "",
Stefan Scherer's avatar
Stefan Scherer committed
80
81
82
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
83
84
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "guest_os_type": "Windows81_64",
Stefan Scherer's avatar
Stefan Scherer committed
85
      "guest_additions_mode": "disable",
Stefan Scherer's avatar
Stefan Scherer committed
86
      "disk_size": "{{user `disk_size`}}",
87
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
88
        "{{user `autounattend`}}",
89
        "./floppy/WindowsPowershell.lnk",
Stefan Scherer's avatar
Stefan Scherer committed
90
        "./floppy/PinTo10.exe",
91
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
92
        "./scripts/disable-screensaver.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
93
94
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1",
        "./scripts/oracle-cert.cer"
      ],
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "2"
        ]
      ]
    }
  ],
Stefan Scherer's avatar
Stefan Scherer committed
115
  "provisioners": [
Stefan Scherer's avatar
Stefan Scherer committed
116
117
    {
      "type": "windows-shell",
Stefan Scherer's avatar
Stefan Scherer committed
118
      "remote_path": "/tmp/script.bat",
Stefan Scherer's avatar
Stefan Scherer committed
119
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
Stefan Scherer's avatar
Stefan Scherer committed
120
121
      "scripts": [
        "./scripts/vm-guest-tools.bat",
Stefan Scherer's avatar
Stefan Scherer committed
122
123
124
        "./scripts/enable-rdp.bat"
      ]
    },
Stefan Scherer's avatar
Stefan Scherer committed
125
126
127
128
129
130
    {
      "type": "powershell",
      "scripts": [
        "./scripts/debloat-windows.ps1"
      ]
    },
Stefan Scherer's avatar
Stefan Scherer committed
131
132
133
    {
      "type": "windows-restart"
    },
134
135
136
    {
      "type": "powershell",
      "scripts": [
Stefan Scherer's avatar
Cleanup    
Stefan Scherer committed
137
138
        "./scripts/set-powerplan.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
139
140
      ]
    },
Stefan Scherer's avatar
Stefan Scherer committed
141
142
143
144
145
    {
      "type": "windows-shell",
      "remote_path": "/tmp/script.bat",
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
146
        "./scripts/pin-powershell.bat",
Stefan Scherer's avatar
Stefan Scherer committed
147
        "./scripts/compile-dotnet-assemblies.bat",
Stefan Scherer's avatar
Cleanup    
Stefan Scherer committed
148
149
        "./scripts/set-winrm-automatic.bat",
        "./scripts/compact.bat"
Stefan Scherer's avatar
Stefan Scherer committed
150
151
152
      ]
    }
  ],
153
154
155
156
157
158
159
  "post-processors": [
    {
      "type": "vagrant",
      "keep_input_artifact": false,
      "output": "windows_10_{{.Provider}}.box",
      "vagrantfile_template": "vagrantfile-windows_10.template"
    }
Stefan Scherer's avatar
Stefan Scherer committed
160
161
  ],
  "variables": {
162
    "iso_url": "http://care.dlservice.microsoft.com/dl/download/B/8/B/B8B452EC-DD2D-4A8F-A88C-D2180C177624/15063.0.170317-1834.RS2_RELEASE_CLIENTENTERPRISEEVAL_OEMRET_X64FRE_EN-US.ISO",
Stefan Scherer's avatar
Stefan Scherer committed
163
    "iso_checksum_type": "sha1",
164
    "iso_checksum": "6c60f91bf0ad7b20f469ab8f80863035c517f34f",
Stefan Scherer's avatar
Stefan Scherer committed
165
    "autounattend": "./answer_files/10/Autounattend.xml",
Stefan Scherer's avatar
Stefan Scherer committed
166
    "disk_size": "61440"
Stefan Scherer's avatar
Stefan Scherer committed
167
  }
168
}