windows_server_insider_docker.json 4.74 KB
Newer Older
1
2
3
{
  "builders": [
    {
Stefan Scherer's avatar
Stefan Scherer committed
4
      "vm_name": "WindowsServerInsiderDocker",
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": "WindowsServerInsiderDocker",
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
      "vnc_port_min": 5900,
      "vnc_port_max": 5980,
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1"
      ],
54
      "vmx_remove_ethernet_interfaces": true,
55
56
57
58
59
60
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068",
Stefan Scherer's avatar
Stefan Scherer committed
61
62
        "virtualHW.version": "12",
        "vhv.enable": "{{user `vhv_enable`}}"
63
64
65
      }
    },
    {
Stefan Scherer's avatar
Stefan Scherer committed
66
      "vm_name": "WindowsServerInsiderDocker",
67
68
69
70
71
      "type": "virtualbox-iso",
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
72
      "headless": "{{user `headless`}}",
73
      "boot_wait": "60s",
74
75
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
Stefan Scherer's avatar
Stefan Scherer committed
76
77
78
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "shutdown_command":
        "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
79
80
      "guest_os_type": "Windows2012_64",
      "guest_additions_mode": "disable",
Stefan Scherer's avatar
Stefan Scherer committed
81
      "disk_size": "{{user `disk_size`}}",
82
83
84
85
      "floppy_files": [
        "{{user `autounattend`}}",
        "./scripts/disable-screensaver.ps1",
        "./scripts/disable-winrm.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
86
        "./scripts/enable-winrm.ps1"
87
88
      ],
      "vboxmanage": [
Stefan Scherer's avatar
Stefan Scherer committed
89
90
        ["modifyvm", "{{.Name}}", "--memory", "2048"],
        ["modifyvm", "{{.Name}}", "--cpus", "2"]
91
92
93
94
95
96
      ]
    }
  ],
  "provisioners": [
    {
      "type": "windows-shell",
Stefan Scherer's avatar
Stefan Scherer committed
97
      "scripts": ["./scripts/vm-guest-tools.bat", "./scripts/enable-rdp.bat"]
98
99
100
    },
    {
      "type": "powershell",
Stefan Scherer's avatar
Stefan Scherer committed
101
      "scripts": ["./scripts/docker/2016/install-containers-feature.ps1"]
102
103
    },
    {
104
105
      "type": "windows-restart",
      "restart_timeout": "{{user `restart_timeout`}}"
106
107
108
109
110
    },
    {
      "type": "powershell",
      "scripts": [
        "./scripts/docker/add-docker-group.ps1",
111
        "./scripts/docker/2016/install-docker-ee-preview.ps1",
112
        "./scripts/docker/docker-pull-insider-async.ps1",
113
        "./scripts/docker/open-docker-insecure-port.ps1",
114
        "./scripts/docker/open-docker-swarm-ports.ps1",
115
116
117
118
119
120
121
122
123
        "./scripts/docker/remove-docker-key-json.ps1",
        "./scripts/docker/disable-windows-defender.ps1"
      ]
    }
  ],
  "post-processors": [
    {
      "type": "vagrant",
      "keep_input_artifact": false,
Stefan Scherer's avatar
Stefan Scherer committed
124
      "output": "windows_server_insider_docker_{{.Provider}}.box",
125
      "vagrantfile_template": "vagrantfile-windows_2016_core.template"
126
127
128
    }
  ],
  "variables": {
129
    "headless": "false",
Stefan Scherer's avatar
Stefan Scherer committed
130
131
132
133
134
135
136
    "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",
137
    "iso_checksum_type": "sha256",
Stefan Scherer's avatar
Stefan Scherer committed
138
139
140
    "iso_checksum":
      "dd412bd5c7d29fa5166a10f4cb36dacf7fcb605a5b8e8a6e8fa87e13aed6851d",
    "autounattend": "./answer_files/server_insider/Autounattend.xml",
141
142
    "restart_timeout": "5m",
    "winrm_timeout": "2h"
143
144
  }
}