If you are using a stock Windows AMI you need to enable winrm and allow it in the fw with a user-script. For a work example see https://github.com/Diabol/packer-demo/blob/master/windows-cloud.json
On Tue, May 1, 2018, 00:59 Rahul Vadisetty <[email protected]> wrote: > { > "variables": { > "aws_access_key": "", > "aws_secret_key": "" > }, > "builders": [{ > "type": "amazon-ebs", > "access_key": "{{user `aws_access_key`}}", > "secret_key": "{{user `aws_secret_key`}}", > "region": "us-east-1", > "source_ami": "ami-a0e957df", > "instance_type": "t2.micro", > "communicator": "winrm", > "winrm_timeout": "4h", > "winrm_port": 5985, > "winrm_username": "Administrator", > "winrm_use_ssl": true, > "winrm_insecure": true, > "ami_name": "packer-example5 {{timestamp}}", > "vpc_id": "vpc-3dfe3a46", > "subnet_id": "subnet-84caf8e0", > "security_group_id": "sg-ba307fcd", > "encrypt_boot": true, > "ami_block_device_mappings": [ > { > "device_name": "/dev/sda1", > "volume_type": "gp2", > "volume_size": 8, > "encrypted": true, > "delete_on_termination": true > } > ] > > > }] > } > > > > -- > 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/dd0c004b-838b-42b7-a776-c60a9f175eb9%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/dd0c004b-838b-42b7-a776-c60a9f175eb9%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/CALz9Rt8Nvu2qoqsBCNu%2BSyBwzkNwyp5eoZcqQSKUm86Wqq7aXg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
