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