85 lines
2.8 KiB
JSON
Executable File
85 lines
2.8 KiB
JSON
Executable File
{
|
|
"builders": [
|
|
{
|
|
"type": "qemu",
|
|
"communicator": "winrm",
|
|
"skip_compaction": "false",
|
|
"output_directory": "VM/win10-install",
|
|
"format": "qcow2",
|
|
"accelerator": "kvm",
|
|
"qemuargs": [
|
|
[
|
|
"-m",
|
|
"8192"
|
|
],
|
|
[
|
|
"-usbdevice",
|
|
"tablet"
|
|
],
|
|
[
|
|
"-smp",
|
|
"4"
|
|
]
|
|
],
|
|
"net_device": "virtio-net",
|
|
"disk_interface": "virtio-scsi",
|
|
"vm_name": "win10-install.qcow2",
|
|
"iso_url": "VM/win10-update/win10-update.qcow2",
|
|
"iso_checksum": "none",
|
|
"disk_image": true,
|
|
"winrm_username": "Administrator",
|
|
"winrm_password": "Aqdcgt12",
|
|
"winrm_timeout": "2h",
|
|
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
|
|
"shutdown_timeout": "30m",
|
|
"cpus": 4,
|
|
"disk_size": "51200",
|
|
"skip_resize_disk": true,
|
|
"headless": true
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "powershell",
|
|
"elevated_user": "Administrator",
|
|
"elevated_password": "Aqdcgt12",
|
|
"script": "scripts/install_virtio_guest.ps1",
|
|
"remote_path": "C:/tools/install_virtio_guest.ps1"
|
|
},
|
|
{
|
|
"type": "powershell",
|
|
"elevated_user": "Administrator",
|
|
"elevated_password": "Aqdcgt12",
|
|
"script": "scripts/install_chocolatey.ps1",
|
|
"remote_path": "C:/tools/install_chocolatey.ps1"
|
|
},
|
|
{
|
|
"type": "powershell",
|
|
"elevated_user": "Administrator",
|
|
"elevated_password": "Aqdcgt12",
|
|
"inline": [
|
|
"Set-ItemProperty 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\' -Name \"fDenyTSConnections\" -Value 0",
|
|
"Set-ItemProperty 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp\\' -Name \"UserAuthentication\" -Value 1",
|
|
"Enable-NetFirewallRule -DisplayGroup \"Remote Desktop\"",
|
|
"Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0",
|
|
"Start-Service sshd",
|
|
"Set-Service -Name sshd -StartupType 'Automatic'",
|
|
"choco install notepadplusplus --yes --no-progress --failonstderr",
|
|
"choco install powershell-core --yes --no-progress --failonstderr",
|
|
"choco install vlc --yes --no-progress --failonstderr",
|
|
"choco install mpv --yes --no-progress --failonstderr",
|
|
"choco install brave --yes --no-progress --failonstderr",
|
|
"choco install Firefox --yes --no-progress --failonstderr",
|
|
"choco install warp --yes --no-progress --failonstderr",
|
|
"choco install microsoft-windows-terminal --yes --no-progress --failonstderr",
|
|
"choco install FoxitReader --yes --no-progress --failonstderr",
|
|
"New-ItemProperty -Path \"HKLM:\\SOFTWARE\\OpenSSH\" -Name DefaultShell -Value 'C:\\Program Files\\PowerShell\\7\\pwsh.exe' -PropertyType String -Force"
|
|
]
|
|
},
|
|
{
|
|
"type": "windows-restart",
|
|
"restart_timeout": "1h"
|
|
}
|
|
]
|
|
}
|