102 lines
3.2 KiB
JSON
102 lines
3.2 KiB
JSON
{
|
|
"builders": [
|
|
{
|
|
"vnc_disable_password": true,
|
|
"keep_registered": true,
|
|
"remote_datastore": "{{user `esxi_datastore`}}",
|
|
"remote_host": "{{user `esxi_host`}}",
|
|
"remote_username": "{{user `esxi_username`}}",
|
|
"remote_password": "{{user `esxi_password`}}",
|
|
"remote_type": "esx5",
|
|
"type": "vmware-iso",
|
|
"vm_name":"Windows10",
|
|
"communicator": "winrm",
|
|
"iso_url": "{{user `iso_url`}}",
|
|
"iso_checksum_type": "{{user `iso_checksum_type`}}",
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"headless": false,
|
|
"boot_wait": "6m",
|
|
"boot_command": "",
|
|
"winrm_username": "vagrant",
|
|
"winrm_password": "vagrant",
|
|
"winrm_timeout": "4h",
|
|
"shutdown_timeout": "2h",
|
|
"shutdown_command": "a:/sysprep.bat",
|
|
"guest_os_type": "windows9-64",
|
|
"disk_size": "{{user `disk_size`}}",
|
|
"vnc_port_min": 5900,
|
|
"vnc_port_max": 5980,
|
|
"version": 11,
|
|
"floppy_files": [
|
|
"{{user `autounattend`}}",
|
|
"../../Packer/floppy/WindowsPowershell.lnk",
|
|
"../../Packer/floppy/PinTo10.exe",
|
|
"../../Packer/scripts/fixnetwork.ps1",
|
|
"../../Packer/scripts/rearm-windows.ps1",
|
|
"../../Packer/scripts/disable-screensaver.ps1",
|
|
"../../Packer/scripts/disable-winrm.ps1",
|
|
"../../Packer/scripts/enable-winrm.ps1",
|
|
"../../Packer/scripts/microsoft-updates.bat",
|
|
"../../Packer/scripts/win-updates.ps1",
|
|
"../../Packer/scripts/unattend.xml",
|
|
"../../Packer/scripts/sysprep.bat"
|
|
],
|
|
"vmx_data": {
|
|
"ethernet0.networkName": "{{user `esxi_network_with_dhcp_and_internet`}}",
|
|
"memsize": "2048",
|
|
"numvcpus": "2",
|
|
"scsi0.virtualDev": "lsisas1068"
|
|
}
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "windows-shell",
|
|
"remote_path": "/tmp/script.bat",
|
|
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
|
|
"scripts": [
|
|
"../../Packer/scripts/vm-guest-tools.bat",
|
|
"../../Packer/scripts/enable-rdp.bat"
|
|
]
|
|
},
|
|
{
|
|
"type": "powershell",
|
|
"scripts": [
|
|
"../../Packer/scripts/debloat-windows.ps1"
|
|
]
|
|
},
|
|
{
|
|
"type": "windows-restart"
|
|
},
|
|
{
|
|
"type": "powershell",
|
|
"scripts": [
|
|
"../../Packer/scripts/set-powerplan.ps1",
|
|
"../../Packer/scripts/docker/disable-windows-defender.ps1"
|
|
]
|
|
},
|
|
{
|
|
"type": "windows-shell",
|
|
"remote_path": "/tmp/script.bat",
|
|
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
|
|
"scripts": [
|
|
"../../Packer/scripts/pin-powershell.bat",
|
|
"../../Packer/scripts/compile-dotnet-assemblies.bat",
|
|
"../../Packer/scripts/set-winrm-automatic.bat",
|
|
"../../Packer/scripts/dis-updates.bat"
|
|
]
|
|
}
|
|
],
|
|
"variables": {
|
|
"esxi_datastore": "",
|
|
"esxi_host": "",
|
|
"esxi_username": "",
|
|
"esxi_password": "",
|
|
"iso_checksum": "sha256:ab4862ba7d1644c27f27516d24cb21e6b39234eb3301e5f1fb365a78b22f79b3",
|
|
"iso_url": "https://software-download.microsoft.com/download/pr/18362.30.190401-1528.19h1_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
|
|
"autounattend": "../../Packer/answer_files/10/Autounattend.xml",
|
|
"disk_size": "61440"
|
|
}
|
|
}
|
|
|