cmder/scripts/packer/windows_10.json

231 lines
7.7 KiB
JSON
Raw Normal View History

2023-03-17 21:30:14 +08:00
{
"builders": [
{
"boot_command": ["a<wait>a<wait>a"],
"boot_wait": "-1s",
"cd_files": [
"{{user `autounattend`}}",
"./scripts/packer/floppy/WindowsPowershell.lnk",
"./scripts/packer/floppy/PinTo10.exe",
"./scripts/packer/scripts/fixnetwork.ps1",
"./scripts/packer/scripts/disable-screensaver.ps1",
"./scripts/packer/scripts/disable-winrm.ps1",
"./scripts/packer/scripts/enable-winrm.ps1",
"./scripts/packer/scripts/microsoft-updates.ps1",
"./scripts/packer/scripts/win-updates.ps1",
"./scripts/packer/scripts/set-shortcut.ps1"
],
"communicator": "winrm",
"configuration_version": "10.0",
"cpus": "{{user `cpus`}}",
"disk_size": "{{user `disk_size`}}",
"enable_dynamic_memory": false,
"enable_mac_spoofing": true,
"enable_secure_boot": true,
"enable_virtualization_extensions": true,
"generation": "2",
"guest_additions_mode": "disable",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"memory": "{{user `memory`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"switch_name": "Default Switch",
"type": "hyperv-iso",
"vm_name": "{{user `vm_name`}}",
"winrm_password": "vagrant",
"winrm_timeout": "{{ user `winrm_timeout` }}",
"winrm_username": "vagrant"
},
{
"boot_command": ["a<wait>a<wait>a"],
"boot_wait": "-1s",
"cd_files": [
"{{user `autounattend`}}",
"./scripts/packer/floppy/WindowsPowershell.lnk",
"./scripts/packer/floppy/PinTo10.exe",
"./scripts/packer/scripts/fixnetwork.ps1",
"./scripts/packer/scripts/disable-screensaver.ps1",
"./scripts/packer/scripts/disable-winrm.ps1",
"./scripts/packer/scripts/enable-winrm.ps1",
"./scripts/packer/scripts/microsoft-updates.ps1",
"./scripts/packer/scripts/win-updates.ps1",
"./scripts/packer/scripts/set-shortcut.ps1"
],
"communicator": "winrm",
"cpus": "{{user `cpus`}}",
"disk_adapter_type": "lsisas1068",
"disk_size": "{{user `disk_size`}}",
"disk_type_id": "1",
"guest_os_type": "windows9-64",
"headless": "{{user `headless`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"memory": "{{user `memory`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "vmware-iso",
"version": "19",
"vm_name": "{{user `vm_name`}}",
"vmx_data": {
"firmware": "efi",
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900"
},
"vmx_remove_ethernet_interfaces": true,
"vnc_port_max": 5980,
"vnc_port_min": 5900,
"winrm_password": "vagrant",
"winrm_timeout": "{{ user `winrm_timeout` }}",
"winrm_username": "vagrant"
},
{
"boot_command": ["a<wait>a<wait>a"],
"boot_wait": "-1s",
"cd_files": [
"{{user `autounattend`}}",
"./scripts/packer/floppy/WindowsPowershell.lnk",
"./scripts/packer/floppy/PinTo10.exe",
"./scripts/packer/scripts/fixnetwork.ps1",
"./scripts/packer/scripts/disable-screensaver.ps1",
"./scripts/packer/scripts/disable-winrm.ps1",
"./scripts/packer/scripts/enable-winrm.ps1",
"./scripts/packer/scripts/microsoft-updates.ps1",
"./scripts/packer/scripts/win-updates.ps1",
"./scripts/packer/scripts/set-shortcut.ps1"
],
"communicator": "winrm",
"cpus": "{{user `cpus`}}",
"disk_size": "{{user `disk_size`}}",
"firmware": "efi",
"guest_additions_mode": "disable",
"guest_os_type": "Windows10_64",
"headless": "{{user `headless`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"memory": "{{user `memory`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "virtualbox-iso",
"vm_name": "{{user `vm_name`}}",
"winrm_password": "vagrant",
"winrm_timeout": "{{ user `winrm_timeout` }}",
"winrm_username": "vagrant"
},
{
"boot_command": "",
"boot_wait": "6m",
"communicator": "winrm",
"cpus": "{{user `cpus`}}",
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"{{user `autounattend`}}",
"./scripts/packer/floppy/WindowsPowershell.lnk",
"./scripts/packer/floppy/PinTo10.exe",
"./scripts/packer/scripts/fixnetwork.ps1",
"./scripts/packer/scripts/disable-screensaver.ps1",
"./scripts/packer/scripts/disable-winrm.ps1",
"./scripts/packer/scripts/enable-winrm.ps1",
"./scripts/packer/scripts/microsoft-updates.ps1",
"./scripts/packer/scripts/win-updates.ps1",
"./scripts/packer/scripts/set-shortcut.ps1"
],
"guest_os_type": "win-10",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_url": "{{user `iso_url`}}",
"memory": "{{user `memory`}}",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"type": "parallels-iso",
"parallels_tools_flavor": "win",
"prlctl": [
[
"set",
"{{.Name}}",
"--efi-boot",
"off"
]
],
"vm_name": "{{user `vm_name`}}",
"winrm_password": "vagrant",
"winrm_timeout": "{{ user `winrm_timeout` }}",
"winrm_username": "vagrant"
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "cmderdev-10_{{.Provider}}.box",
"type": "vagrant",
"vagrantfile_template": "vagrantfile-windows_10.template"
}
],
"provisioners": [
{
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [
"./scripts/packer/scripts/enable-rdp.bat"
],
"type": "windows-shell"
},
{
"scripts": [
"./scripts/packer/scripts/vm-guest-tools.ps1",
"./scripts/packer/scripts/debloat-windows.ps1"
],
"type": "powershell"
},
{
"restart_timeout": "{{user `restart_timeout`}}",
"type": "windows-restart"
},
{
"scripts": [
"./scripts/packer/scripts/set-powerplan.ps1",
"./scripts/packer/scripts/docker/disable-windows-defender.ps1"
],
"type": "powershell"
},
{
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [
"./scripts/packer/scripts/chocolatey.bat"
],
"type": "windows-shell"
},
{
"scripts": [
"./scripts/packer/scripts/chocopacks.ps1"
],
"type": "powershell"
},
{
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
"remote_path": "/tmp/script.bat",
"scripts": [
"./scripts/packer/scripts/pin-powershell.bat",
"./scripts/packer/scripts/compile-dotnet-assemblies.bat",
"./scripts/packer/scripts/set-winrm-automatic.bat",
"./scripts/packer/scripts/uac-enable.bat",
"./scripts/packer/scripts/dis-updates.bat",
"./scripts/packer/scripts/compact.bat"
],
"type": "windows-shell"
}
],
"variables": {
"autounattend": "./scripts/packer/answer_files/10_efi/Autounattend.xml",
"cpus": "2",
"disk_size": "262144",
"disk_type_id": "1",
"memory": "4096",
"headless": "false",
"iso_url": "./scripts/packer/iso/Windows_10.iso",
"iso_checksum": "none",
"restart_timeout": "5m",
"vhv_enable": "false",
"virtio_win_iso": "~/virtio-win.iso",
"vm_name": "cmderdev10",
"winrm_timeout": "6h",
"vmx_version": "14"
}
}