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