windows_10.json 3.01 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 10
      "headless": false,
      "boot_wait": "2m",
Stefan Scherer's avatar
Stefan Scherer committed
11 12 13
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
14 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,
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
20
        "{{user `autounattend`}}",
21
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
22 23
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
24
        "./scripts/microsoft-updates.bat",
Stefan Scherer's avatar
Stefan Scherer committed
25
        "./scripts/win-updates.ps1"
26 27 28 29 30 31 32 33 34 35 36
      ],
      "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
37 38 39 40
      "communicator": "winrm",
      "iso_url": "{{user `iso_url`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_checksum": "{{user `iso_checksum`}}",
41 42
      "headless": false,
      "boot_wait": "2m",
Stefan Scherer's avatar
Stefan Scherer committed
43 44 45
      "winrm_username": "vagrant",
      "winrm_password": "vagrant",
      "winrm_timeout": "2h",
46 47
      "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
48
      "guest_additions_mode": "disable",
49 50
      "disk_size": 61440,
      "floppy_files": [
Stefan Scherer's avatar
Stefan Scherer committed
51
        "{{user `autounattend`}}",
52
        "./scripts/fixnetwork.ps1",
Stefan Scherer's avatar
Stefan Scherer committed
53 54
        "./scripts/disable-winrm.ps1",
        "./scripts/enable-winrm.ps1",
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
        "./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
75 76
  "provisioners": [
    {
Stefan Scherer's avatar
Stefan Scherer committed
77 78 79 80
      "type": "windows-restart"
    },
    {
      "type": "windows-shell",
Stefan Scherer's avatar
Stefan Scherer committed
81
      "remote_path": "/tmp/script.bat",
Stefan Scherer's avatar
Stefan Scherer committed
82
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
Stefan Scherer's avatar
Stefan Scherer committed
83 84 85
      "scripts": [
        "./scripts/vm-guest-tools.bat",
        "./scripts/enable-rdp.bat",
Stefan Scherer's avatar
Stefan Scherer committed
86
        "./scripts/compile-dotnet-assemblies.bat",
Stefan Scherer's avatar
Stefan Scherer committed
87 88 89 90
        "./scripts/compact.bat"
      ]
    }
  ],
91 92 93 94 95 96 97
  "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
98 99
  ],
  "variables": {
100
    "iso_url": "http://iso.esd.microsoft.com/W10IP/BF15E0F8F8F6B6BFCD0F62892BFBA60756371D21/Windows10_InsiderPreview_x64_EN-US_10565.iso",
Stefan Scherer's avatar
Stefan Scherer committed
101
    "iso_checksum_type": "sha1",
102
    "iso_checksum": "EA37A740FD0744CAE856D1B12FB4167F6EE88B54",
Stefan Scherer's avatar
Stefan Scherer committed
103 104
    "autounattend": "./answer_files/10/Autounattend.xml"
  }
105
}