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