forked from StefanScherer/packer-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request StefanScherer#129 from LM3CORP/my
add windows 2016 core image and remove vm guest tool installation
- Loading branch information
Showing
3 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"builders": [ | ||
{ | ||
"boot_wait": "2m", | ||
"communicator": "winrm", | ||
"disk_size": "{{user `disk_size`}}", | ||
"floppy_files": [ | ||
"{{user `autounattend`}}", | ||
"./scripts/disable-screensaver.ps1", | ||
"./scripts/disable-winrm.ps1", | ||
"./scripts/enable-winrm.ps1", | ||
"./scripts/microsoft-updates.bat", | ||
"./scripts/win-updates.ps1" | ||
], | ||
"guest_additions_mode": "disable", | ||
"guest_os_type": "Windows2016_64", | ||
"headless": "{{user `headless`}}", | ||
"iso_checksum": "{{user `iso_checksum`}}", | ||
"iso_checksum_type": "{{user `iso_checksum_type`}}", | ||
"iso_url": "{{user `iso_url`}}", | ||
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", | ||
"format": "ova", | ||
"type": "virtualbox-iso", | ||
"vboxmanage": [ | ||
[ | ||
"modifyvm", | ||
"{{.Name}}", | ||
"--memory", | ||
"2048" | ||
], | ||
[ | ||
"modifyvm", | ||
"{{.Name}}", | ||
"--cpus", | ||
"2" | ||
] | ||
], | ||
"winrm_password": "vagrant", | ||
"winrm_timeout": "{{user `winrm_timeout`}}", | ||
"winrm_username": "vagrant" | ||
} | ||
], | ||
"post-processors": [ | ||
{ | ||
"keep_input_artifact": false, | ||
"output": "windows_2016_core_{{.Provider}}.box", | ||
"type": "vagrant", | ||
"vagrantfile_template": "vagrantfile-windows_2016_core.template" | ||
}, | ||
{ | ||
"type": "amazon-import", | ||
"only": ["virtualbox-iso"], | ||
"access_key": "", | ||
"secret_key": "", | ||
"region": "", | ||
"ami_name": "packer_windows_2016_core", | ||
"s3_bucket_name": "{{user `aws_s3_bucket_name`}}", | ||
"keep_input_artifact": false, | ||
"license_type": "BYOL", | ||
"tags": | ||
{ | ||
"Description": "packer-windows 2016 core amazon-import {{timestamp}}" | ||
} | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"scripts": [ | ||
"./scripts/enable-rdp.bat" | ||
], | ||
"type": "windows-shell" | ||
}, | ||
{ | ||
"scripts": [ | ||
"./scripts/debloat-windows.ps1" | ||
], | ||
"type": "powershell" | ||
}, | ||
{ | ||
"scripts": [ | ||
"./scripts/set-winrm-automatic.bat", | ||
"./scripts/uac-enable.bat", | ||
"./scripts/compile-dotnet-assemblies.bat", | ||
"./scripts/dis-updates.bat", | ||
"./scripts/compact.bat" | ||
], | ||
"type": "windows-shell" | ||
} | ||
], | ||
"variables": { | ||
"autounattend": "./answer_files/2016_core/Autounattend.xml", | ||
"disk_size": "61440", | ||
"disk_type_id": "1", | ||
"headless": "false", | ||
"iso_checksum": "70721288BBCDFE3239D8F8C0FAE55F1F", | ||
"iso_checksum_type": "md5", | ||
"iso_url": "https://software-download.microsoft.com/download/pr/Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh.ISO", | ||
"winrm_timeout": "6h", | ||
"aws_s3_bucket_name": "{{env `AWS_S3_BUCKET`}}" | ||
} | ||
} | ||
|