Packer winrm issue

35 views
Skip to first unread message

Rahul Vadisetty

unread,
Apr 30, 2018, 6:59:39 PM4/30/18
to Packer
{
  "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
                  }
            ]

       
}]
}



winrm.JPG

Rickard von Essen

unread,
May 1, 2018, 2:04:30 AM5/1/18
to packe...@googlegroups.com
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

--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/dd0c004b-838b-42b7-a776-c60a9f175eb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages