Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Bob Tanner
packer-windows
Commits
544584df
Commit
544584df
authored
Sep 18, 2018
by
lmayorga
Browse files
add windows 2016 core image and remove vm guest tool installation
parent
1a0a97b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
README-ami.md
View file @
544584df
...
@@ -9,3 +9,4 @@ the amazon import service https://docs.aws.amazon.com/vm-import/latest/userguide
...
@@ -9,3 +9,4 @@ the amazon import service https://docs.aws.amazon.com/vm-import/latest/userguide
*
Packer 1.2.3+. https://www.packer.io/downloads.html
*
Packer 1.2.3+. https://www.packer.io/downloads.html
*
S3 Bucket with the necessary permissions. Set the
`AWS_S3_BUCKET`
environment variable.
*
S3 Bucket with the necessary permissions. Set the
`AWS_S3_BUCKET`
environment variable.
*
If you use SAML authentication make sure you set
`profile`
in the amazon-import post-processor.
*
If you use SAML authentication make sure you set
`profile`
in the amazon-import post-processor.
*
`vm-guest-tools`
provisioner is removed.
windows_2016_ami.json
View file @
544584df
...
@@ -56,12 +56,13 @@
...
@@ -56,12 +56,13 @@
"access_key"
:
""
,
"access_key"
:
""
,
"secret_key"
:
""
,
"secret_key"
:
""
,
"region"
:
""
,
"region"
:
""
,
"ami_name"
:
"packer_windows_2016"
,
"s3_bucket_name"
:
"{{user `aws_s3_bucket_name`}}"
,
"s3_bucket_name"
:
"{{user `aws_s3_bucket_name`}}"
,
"keep_input_artifact"
:
false
,
"keep_input_artifact"
:
false
,
"license_type"
:
"BYOL"
,
"license_type"
:
"BYOL"
,
"tags"
:
"tags"
:
{
{
"Description"
:
"packer-windows amazon-import {{timestamp}}"
"Description"
:
"packer-windows
2016
amazon-import {{timestamp}}"
}
}
}
}
],
],
...
@@ -69,7 +70,6 @@
...
@@ -69,7 +70,6 @@
{
{
"execute_command"
:
"{{ .Vars }} cmd /c
\"
{{ .Path }}
\"
"
,
"execute_command"
:
"{{ .Vars }} cmd /c
\"
{{ .Path }}
\"
"
,
"scripts"
:
[
"scripts"
:
[
"./scripts/vm-guest-tools.bat"
,
"./scripts/enable-rdp.bat"
"./scripts/enable-rdp.bat"
],
],
"type"
:
"windows-shell"
"type"
:
"windows-shell"
...
...
windows_2016_core_ami.json
0 → 100644
View file @
544584df
{
"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"
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment