Here's a shell template for you, let me know if this works for you.
Here's a shell template for you:
{
"variables": {
...
},
"builders": [
{
"type": "hyperv-iso",
"name": "tmpl-hyperv",
...
},
{
"type": "vmware-iso",
"name": "tmpl-vmware",
...
}],
"provisioners": [{
"type": "powershell",
"only": ["tmpl-vmware"],
"elevated_user": "user",
"elevated_password": "password",
"scripts": [
....
]},
{
"type": "powershell",
"elevated_user": "user",
"elevated_password": "password",
"scripts": [
...
]
}]
}
On Tuesday, September 25, 2018 at 5:36:21 PM UTC-4, StatsfX wrote:
>
> I've done this with esxi and hyper-v within the same packer build file.
> You just need to use separate builders, but your subsequent work is the
> same (provisioners etc).
>
> In the provisioners sections it allows you to also specify that certain
> steps should only be applied to certain build names. For example we only
> want VMware tools installed on the esxi image, but the rest may remain the
> same.
>
> I am not at my terminal right now but may be able to provide an example
> once I am if you still require it.
>
>
>
> Luke
>
>
> Sent from my Samsung Galaxy smartphone.
>
> -------- Original message --------
> From: Vamfoom <[email protected]>
> Date: 2018-09-25 5:24 PM (GMT-05:00)
> To: Packer <[email protected]>
> Subject: [packer] multiple platforms
>
> I'm new to packer. According to the documentation, packer is capable of
> creating identical images for multiple platforms but all the examples I saw
> targets specific platform. How would I go about using the same "recipe"
> for creating a qemu and esx image? If someone has an example, it would be
> very useful.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/a338f679-a366-4643-a074-65ccc9430638%40googlegroups.com
>
> <https://groups.google.com/d/msgid/packer-tool/a338f679-a366-4643-a074-65ccc9430638%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/eda8206f-4aaf-434b-96d1-efc449389607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.