windows_10.json 3.61 KB
Newer Older
1 2 3 4
{
  "builders": [
    {
      "type": "vmware-iso",
Stefan Scherer's avatar
Stefan Scherer committed
5 6 7 8
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
9
      "headless": false,
Stefan Scherer's avatar
Stefan Scherer committed
10 11
      "boot_wait": "6m",
      "boot_command": "{{user `product_key`}}<enter>",
Stefan Scherer's avatar
Stefan Scherer committed
12 13 14
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
15 16 17 18 19
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "guest_os_type": "windows8srv-64",
      "disk_size": 61440,
      "vnc_port_min": 5900,
      "vnc_port_max": 5980,
20
      "version": 11,
21
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
22
        "{{user `autounattend`}}",
23
        "./floppy/WindowsPowershell.lnk",
Stefan Scherer's avatar
Stefan Scherer committed
24
        "./floppy/PinTo10.exe",
25
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
26 27
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
28
        "./scripts/microsoft-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
29
        "./scripts/win-updates.ps1"
30 31 32 33 34 35 36 37 38 39 40
      ],
      "vmx_data": {
        "RemoteDisplay.vnc.enabled": "false",
        "RemoteDisplay.vnc.port": "5900",
        "memsize": "2048",
        "numvcpus": "2",
        "scsi0.virtualDev": "lsisas1068"
      }
    },
    {
      "type": "virtualbox-iso",
Stefan Scherer's avatar
Stefan Scherer committed
41 42 43 44
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
45
      "headless": false,
Stefan Scherer's avatar
Stefan Scherer committed
46 47
      "boot_wait": "6m",
      "boot_command": "<tab>{{user `product_key`}}<enter>",
Stefan Scherer's avatar
Stefan Scherer committed
48 49 50
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
51 52
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
      "guest_os_type": "Windows81_64",
Stefan Scherer's avatar
Stefan Scherer committed
53
      "guest_additions_mode": "disable",
54 55
      "disk_size": 61440,
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
56
        "{{user `autounattend`}}",
57
        "./floppy/WindowsPowershell.lnk",
Stefan Scherer's avatar
Stefan Scherer committed
58
        "./floppy/PinTo10.exe",
59
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
60 61
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
62
        "./scripts/set-powerplan.ps1",
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
        "./scripts/microsoft-updates.bat",
        "./scripts/win-updates.ps1",
        "./scripts/oracle-cert.cer"
      ],
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "2048"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "2"
        ]
      ]
    }
  ],
Stefan Scherer's avatar
Stefan Scherer committed
83
  "provisioners": [
Stefan Scherer's avatar
Stefan Scherer committed
84 85
    {
      "type": "windows-shell",
Stefan Scherer's avatar
Stefan Scherer committed
86
      "remote_path": "/tmp/script.bat",
Stefan Scherer's avatar
Stefan Scherer committed
87
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
Stefan Scherer's avatar
Stefan Scherer committed
88 89
      "scripts": [
        "./scripts/vm-guest-tools.bat",
Stefan Scherer's avatar
Stefan Scherer committed
90 91 92 93 94 95 96 97 98 99 100
        "./scripts/enable-rdp.bat"
      ]
    },
    {
      "type": "windows-restart"
    },
    {
      "type": "windows-shell",
      "remote_path": "/tmp/script.bat",
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
      "scripts": [
Stefan Scherer's avatar
Stefan Scherer committed
101
        "./scripts/pin-powershell.bat",
Stefan Scherer's avatar
Stefan Scherer committed
102
        "./scripts/compile-dotnet-assemblies.bat",
Stefan Scherer's avatar
Stefan Scherer committed
103
        "./scripts/set-winrm-automatic.bat",
Stefan Scherer's avatar
Stefan Scherer committed
104 105 106 107
        "./scripts/compact.bat"
      ]
    }
  ],
108 109 110 111 112 113 114
  "post-processors": [
    {
      "type": "vagrant",
      "keep_input_artifact": false,
      "output": "windows_10_{{.Provider}}.box",
      "vagrantfile_template": "vagrantfile-windows_10.template"
    }
Stefan Scherer's avatar
Stefan Scherer committed
115 116
  ],
  "variables": {
117
    "iso_url": "http://iso.esd.microsoft.com/W10IP/BF15E0F8F8F6B6BFCD0F62892BFBA60756371D21/Windows10_InsiderPreview_x64_EN-US_10565.iso",
Stefan Scherer's avatar
Stefan Scherer committed
118
    "iso_checksum_type": "sha1",
119
    "iso_checksum": "EA37A740FD0744CAE856D1B12FB4167F6EE88B54",
Stefan Scherer's avatar
Stefan Scherer committed
120 121
    "autounattend": "./answer_files/10/Autounattend.xml",
    "product_key": "<tab><tab>"
Stefan Scherer's avatar
Stefan Scherer committed
122
  }
123
}