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