windows_server_insider.json 4.4 KB
Newer Older
1
2
3
{
  "builders": [
    {
Patrick Lang's avatar
Patrick Lang committed
4
      "boot_command": [
Patrick Lang's avatar
Patrick Lang committed
5
        "<enter>"
Patrick Lang's avatar
Patrick Lang committed
6
      ],
Patrick Lang's avatar
Patrick Lang committed
7
      "boot_wait": "1s",
8
9
10
11
12
      "communicator": "winrm",
      "cpu": 2,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
13
      "generation": 2,
14
15
16
17
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
18
      "ram_size": 2048,
19
20
21
      "secondary_iso_images": [
        "./iso/windows_server_insider_unattend.iso"
      ],
22
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
Stefan Scherer's avatar
Stefan Scherer committed
23
      "switch_name": "{{user `hyperv_switchname`}}",
24
      "type": "hyperv-iso",
Stefan Scherer's avatar
Stefan Scherer committed
25
      "vm_name": "WindowsServerInsider",
26
      "winrm_password": "vagrant",
Stefan Scherer's avatar
Stefan Scherer committed
27
      "winrm_timeout": "{{user `winrm_timeout`}}",
28
29
30
      "winrm_username": "vagrant"
    },
    {
31
32
33
      "boot_command": [
        "<enter>"
      ],
34
35
      "boot_wait": "60s",
      "communicator": "winrm",
36
37
      "cpus": 2,
      "disk_adapter_type": "lsisas1068",
Stefan Scherer's avatar
Stefan Scherer committed
38
39
      "disk_size": "{{user `disk_size`}}",
      "disk_type_id": "{{user `disk_type_id`}}",
40
41
42
43
44
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1"
      ],
45
46
47
48
49
      "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`}}",
50
      "memory": 2048,
51
52
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "vmware-iso",
53
      "version": 14,
54
      "vm_name": "WindowsServerInsider",
55
56
57
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
58
        "vhv.enable": "{{user `vhv_enable`}}"
59
60
61
62
63
64
65
      },
      "vmx_remove_ethernet_interfaces": true,
      "vnc_port_max": 5980,
      "vnc_port_min": 5900,
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
66
67
    },
    {
68
69
70
      "boot_command": [
        "<enter>"
      ],
71
      "boot_wait": "60s",
72
      "communicator": "winrm",
73
      "cpus": 2,
Stefan Scherer's avatar
Stefan Scherer committed
74
      "disk_size": "{{user `disk_size`}}",
75
76
77
78
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
79
        "./scripts/enable-winrm.ps1"
80
      ],
81
      "guest_additions_mode": "disable",
Stefan Scherer's avatar
Stefan Scherer committed
82
      "guest_os_type": "Windows2016_64",
83
84
85
86
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
87
      "memory": 2048,
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "type": "virtualbox-iso",
      "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"
102
103
104
105
    }
  ],
  "provisioners": [
    {
Stefan Scherer's avatar
Stefan Scherer committed
106
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
107
108
109
110
111
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat"
      ],
      "type": "windows-shell"
112
113
    },
    {
114
115
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
116
117
    },
    {
Stefan Scherer's avatar
Stefan Scherer committed
118
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
119
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
120
121
        "./scripts/set-winrm-automatic.bat",
        "./scripts/uac-enable.bat",
122
        "./scripts/compact.bat"
123
124
      ],
      "type": "windows-shell"
125
126
127
    }
  ],
  "variables": {
128
    "autounattend": "./answer_files/server_insider/Autounattend.xml",
Stefan Scherer's avatar
Stefan Scherer committed
129
130
    "disk_size": "61440",
    "disk_type_id": "1",
131
    "headless": "false",
132
    "iso_checksum": "B1216DBCC06D754E9701D42BE62BA039284F0F2DC4DE782CBB1CC7EE52F3E243",
133
    "iso_checksum_type": "sha256",
134
    "iso_url": "https://software-download.microsoft.com/sg/Windows_InsiderPreview_Server_en-us_18346.iso",
135
    "manually_download_iso_from": "https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver",
136
    "restart_timeout": "5m",
137
    "vhv_enable": "false",
138
    "winrm_timeout": "2h"
139
  }
140
141
}