windows_2016.json 4.98 KB
Newer Older
1 2
{
  "builders": [
3 4
    {
      "boot_wait": "0s",
5 6 7 8 9
      "communicator": "winrm",
      "cpu": 2,
      "disk_size": "{{user `disk_size`}}",
      "enable_secure_boot": true,
      "enable_virtualization_extensions": true,
10
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
11
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
12
        "./scripts/disable-screensaver.ps1",
13 14 15
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
        "./scripts/microsoft-updates.bat",
16 17
        "./scripts/unattend.xml",
        "./scripts/sysprep.bat",
18 19
        "./scripts/win-updates.ps1"
      ],
20 21 22 23
      "guest_additions_mode": "disable",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
24
      "ram_size": 2048,
25 26 27 28 29 30 31
      "shutdown_command": "a:/sysprep.bat",
      "switch_name": "{{user `hyperv_switchname`}}",
      "type": "hyperv-iso",
      "vm_name": "WindowsServer2016",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
32
    },
33
    {
34
      "boot_wait": "2m",
35
      "communicator": "winrm",
36 37
      "disk_size": "{{user `disk_size`}}",
      "disk_type_id": "{{user `disk_type_id`}}",
38
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
39
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
40
        "./scripts/disable-screensaver.ps1",
41
        "./scripts/disable-winrm.ps1",
42
        "./scripts/enable-winrm.ps1",
43
        "./scripts/microsoft-updates.bat",
44 45
        "./scripts/unattend.xml",
        "./scripts/sysprep.bat",
46
        "./scripts/win-updates.ps1"
47
      ],
48
      "guest_os_type": "Windows2016_64",
49 50 51 52 53 54 55 56
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
      "shutdown_command": "a:/sysprep.bat",
      "type": "vmware-iso",
      "version": 11,
      "vm_name": "WindowsServer2016",
57 58 59 60 61
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
62
        "scsi0.virtualDev": "lsisas1068"
63 64 65 66 67 68 69
      },
      "vmx_remove_ethernet_interfaces": true,
      "vnc_port_max": 5980,
      "vnc_port_min": 5900,
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
70 71
    },
    {
72
      "boot_wait": "2m",
73
      "communicator": "winrm",
74
      "disk_size": "{{user `disk_size`}}",
75
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
76
        "{{user `autounattend`}}",
Stefan Scherer's avatar
Stefan Scherer committed
77
        "./scripts/disable-screensaver.ps1",
78
        "./scripts/disable-winrm.ps1",
79
        "./scripts/enable-winrm.ps1",
80 81
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1",
82
        "./scripts/unattend.xml",
Stefan Scherer's avatar
Stefan Scherer committed
83
        "./scripts/sysprep.bat"
84
      ],
85
      "guest_additions_mode": "disable",
86
      "guest_os_type": "Windows2016_64",
87 88 89 90 91 92
      "headless": "{{user `headless`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `iso_url`}}",
      "shutdown_command": "a:/sysprep.bat",
      "type": "virtualbox-iso",
93 94 95 96 97 98 99 100 101 102 103 104 105
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "2"
        ]
106 107 108 109 110 111 112 113 114 115 116 117 118
      ],
      "vm_name": "WindowsServer2016",
      "winrm_password": "vagrant",
      "winrm_timeout": "{{user `winrm_timeout`}}",
      "winrm_username": "vagrant"
    }
  ],
  "post-processors": [
    {
      "keep_input_artifact": false,
      "output": "windows_2016_{{.Provider}}.box",
      "type": "vagrant",
      "vagrantfile_template": "vagrantfile-windows_2016.template"
119 120 121 122
    }
  ],
  "provisioners": [
    {
123
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
124 125
      "scripts": [
        "./scripts/vm-guest-tools.bat",
126
        "./scripts/enable-rdp.bat"
127 128
      ],
      "type": "windows-shell"
Stefan Scherer's avatar
Stefan Scherer committed
129
    },
Stefan Scherer's avatar
Stefan Scherer committed
130 131 132
    {
      "scripts": [
        "./scripts/debloat-windows.ps1"
133 134
      ],
      "type": "powershell"
Stefan Scherer's avatar
Stefan Scherer committed
135
    },
Stefan Scherer's avatar
Stefan Scherer committed
136
    {
137 138
      "restart_timeout": "{{user `restart_timeout`}}",
      "type": "windows-restart"
Stefan Scherer's avatar
Stefan Scherer committed
139 140 141 142
    },
    {
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
143
        "./scripts/pin-powershell.bat",
Stefan Scherer's avatar
Stefan Scherer committed
144 145
        "./scripts/set-winrm-automatic.bat",
        "./scripts/uac-enable.bat",
146 147
        "./scripts/compile-dotnet-assemblies.bat",
        "./scripts/dis-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
148
        "./scripts/compact.bat"
149 150
      ],
      "type": "windows-shell"
151
    }
Stefan Scherer's avatar
Stefan Scherer committed
152 153
  ],
  "variables": {
154
    "autounattend": "./answer_files/2016/Autounattend.xml",
155 156
    "disk_size": "61440",
    "disk_type_id": "1",
157
    "headless": "false",
158
    "hyperv_switchname": "{{env `hyperv_switchname`}}",
159 160 161
    "iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F",
    "iso_checksum_type": "md5",
    "iso_url": "http://care.dlservice.microsoft.com/dl/download/1/4/9/149D5452-9B29-4274-B6B3-5361DBDA30BC/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.ISO",
162 163
    "restart_timeout": "5m",
    "winrm_timeout": "2h"
Stefan Scherer's avatar
Stefan Scherer committed
164
  }
165
}
166