Hello, it should be user_data or user_data_file in the builder section, that winrm need to be enabled before the provisioner can run
https://www.packer.io/docs/builders/openstack.html - user_data <https://www.packer.io/docs/builders/openstack.html#user_data> (string) - User data to apply when launching the instance. Note that you need to be careful about escaping characters due to the templates being JSON. It is often more convenient to use user_data_file, instead. - user_data_file <https://www.packer.io/docs/builders/openstack.html#user_data_file> (string) - Path to a file that will be used for the user data when launching the instance. Thanks Alvaro On Fri, Sep 9, 2016 at 11:28 PM, Curt Wilhelm <[email protected]> wrote: > Hello > > I'm looking for some details about how to build windows images with > openstack using the packer openstack builder. I'm using the winrm > communicator. It's possible that winrm isn't installed on the source > image. Can packer help install that through userdata? Are there sample > scripts? > > ./packer build ./packer.json > > *openstack output will be in this color.* > > > *==> openstack: Discovering enabled extensions...* > > *==> openstack: Loading flavor: m1.large* > > openstack: Verified flavor. ID: d15f561e-a043-4b3d-97c6-87f10f382ecd > > *==> openstack: Creating temporary keypair: packer > 57d328a7-70e3-2f6c-e034-42820f61eccc ...* > > *==> openstack: Created temporary keypair: packer > 57d328a7-70e3-2f6c-e034-42820f61eccc* > > *==> openstack: Successfully converted BER encoded SSH key to DER > encoding.* > > *==> openstack: Launching server...* > > openstack: Server ID: 8faa0f3f-6e57-4e41-9562-96f0149a8e0a > > *==> openstack: Waiting for server to become ready...* > > *==> openstack: Skipping waiting for password since WinRM password set...* > > *==> openstack: Waiting for WinRM to become available...*cat packer.json > > { > > "builders": [{ > > "type":"openstack", > > "communicator": "winrm", > > "winrm_username": "Administrator", > > "winrm_port": 5986, > > "winrm_use_ssl": true, > > "winrm_insecure": true, > > "username":"xxxx", > > "password":"xxxx", > > "api_key":"", > > "availability_zone":"nova", > > "domain_name":"default", > > "region":"", > > "tenant_id":"xxxx", > > "source_image": "d8c1d24f-f190-4a05-970e-7b06b2a22237", > > "flavor": "m1.large", > > "insecure": "true", > > "ssh_username": "centos", > > "image_name": "services-windows2012", > > "identity_endpoint":"http://xxxxxx:5000/v3", > > "endpoint_type":"public", > > "security_groups":["default"] > > }], > > "provisioners":[{ > > "type": "powershell", "scripts": ["xxxx.ps1"] > > }] > > } > > > > Any help is apprecated! > > > Curt > > > > -- > 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/741758ef-6635-4b05-977f-9c0361bf6d3a%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/741758ef-6635-4b05-977f-9c0361bf6d3a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Alvaro (+31)103400555 -- 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/CAHqq0ewbE9_Xx_NJHPaGwo6Tf1t_TNVrgF2L3cB2tsaAGjUaNA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
