You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.9 KiB
100 lines
2.9 KiB
{
|
|
"builders": [
|
|
{
|
|
"accelerator": "kvm",
|
|
"boot_wait": "6m",
|
|
"communicator": "winrm",
|
|
"cpus": "2",
|
|
"disk_size": "{{user `disk_size`}}",
|
|
"floppy_files": [
|
|
"{{user `autounattend`}}",
|
|
"./floppy/WindowsPowershell.lnk",
|
|
"./floppy/PinTo10.exe",
|
|
"./scripts/fixnetwork.ps1",
|
|
"./scripts/disable-screensaver.ps1",
|
|
"./scripts/disable-winrm.ps1",
|
|
"./scripts/enable-winrm.ps1",
|
|
"./scripts/microsoft-updates.bat",
|
|
"./scripts/win-updates.ps1"
|
|
],
|
|
"headless": true,
|
|
"iso_checksum": "{{user `iso_checksum`}}",
|
|
"iso_url": "{{user `iso_url`}}",
|
|
"memory": "{{user `memory`}}",
|
|
"output_directory": "windows_10-qemu",
|
|
"qemu_binary": "/usr/libexec/qemu-kvm",
|
|
"qemuargs": [
|
|
[
|
|
"-drive",
|
|
"file=windows_10-qemu/{{ .Name }},if=virtio,cache=writeback,discard=ignore,format=qcow2,index=1"
|
|
],
|
|
[
|
|
"-drive",
|
|
"file={{ user `iso_url` }},media=cdrom,index=2"
|
|
],
|
|
[
|
|
"-drive",
|
|
"file={{ user `virtio_win_iso` }},media=cdrom,index=3"
|
|
]
|
|
],
|
|
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
|
|
"type": "qemu",
|
|
"vm_name": "{{user `vm_name`}}",
|
|
"winrm_password": "vagrant",
|
|
"winrm_timeout": "{{user `winrm_timeout`}}",
|
|
"winrm_username": "vagrant"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
|
|
"remote_path": "/tmp/script.bat",
|
|
"scripts": [
|
|
"./scripts/enable-rdp.bat"
|
|
],
|
|
"type": "windows-shell"
|
|
},
|
|
{
|
|
"scripts": [
|
|
"./scripts/vm-guest-tools.ps1",
|
|
"./scripts/debloat-windows.ps1"
|
|
],
|
|
"type": "powershell"
|
|
},
|
|
{
|
|
"restart_timeout": "{{user `restart_timeout`}}",
|
|
"type": "windows-restart"
|
|
},
|
|
{
|
|
"scripts": [
|
|
"./scripts/set-powerplan.ps1",
|
|
"./scripts/docker/disable-windows-defender.ps1"
|
|
],
|
|
"type": "powershell"
|
|
},
|
|
{
|
|
"execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
|
|
"remote_path": "/tmp/script.bat",
|
|
"scripts": [
|
|
"./scripts/pin-powershell.bat",
|
|
"./scripts/compile-dotnet-assemblies.bat",
|
|
"./scripts/set-winrm-automatic.bat",
|
|
"./scripts/uac-enable.bat",
|
|
"./scripts/dis-updates.bat",
|
|
"./scripts/compact.bat"
|
|
],
|
|
"type": "windows-shell"
|
|
}
|
|
],
|
|
"variables": {
|
|
"autounattend": "Autounattend.xml",
|
|
"disk_size": "61440",
|
|
"memory": "2048",
|
|
"iso_checksum": "sha256:f1a4f2176259167cd2c8bf83f3f5a4039753b6cc28c35ac624da95a36e9620fc",
|
|
"iso_url": "https://software-download.microsoft.com/download/pr/19041.264.200511-0456.vb_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
|
|
"restart_timeout": "5m",
|
|
"virtio_win_iso": "virtio-win.iso",
|
|
"vm_name": "windows_10",
|
|
"winrm_timeout": "6h"
|
|
}
|
|
}
|
|
|