{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/packer/issues/2360","labels_url":"https://api.github.com/repos/mitchellh/packer/issues/2360/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/packer/issues/2360/comments","events_url":"https://api.github.com/repos/mitchellh/packer/issues/2360/events","html_url":"https://github.com/mitchellh/packer/issues/2360","id":91941020,"number":2360,"title":"0.8.0 - EC2 ami_block_device_mappings not mapping ephemeral devices correctly.","user":{"login":"aspring","id":1149325,"avatar_url":"https://avatars.githubusercontent.com/u/1149325?v=3","gravatar_id":"","url":"https://api.github.com/users/aspring","html_url":"https://github.com/aspring","followers_url":"https://api.github.com/users/aspring/followers","following_url":"https://api.github.com/users/aspring/following{/other_user}","gists_url":"https://api.github.com/users/aspring/gists{/gist_id}","starred_url":"https://api.github.com/users/aspring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspring/subscriptions","organizations_url":"https://api.github.com/users/aspring/orgs","repos_url":"https://api.github.com/users/aspring/repos","events_url":"https://api.github.com/users/aspring/events{/privacy}","received_events_url":"https://api.github.com/users/aspring/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitchellh/packer/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/mitchellh/packer/labels/builder/amazon","name":"builder/amazon","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mitchellh/packer/milestones/7","html_url":"https://github.com/mitchellh/packer/milestones/v0.8.1","labels_url":"https://api.github.com/repos/mitchellh/packer/milestones/7/labels","id":1183527,"number":7,"title":"v0.8.1","description":"","creator":{"login":"cbednarski","id":649798,"avatar_url":"https://avatars.githubusercontent.com/u/649798?v=3","gravatar_id":"","url":"https://api.github.com/users/cbednarski","html_url":"https://github.com/cbednarski","followers_url":"https://api.github.com/users/cbednarski/followers","following_url":"https://api.github.com/users/cbednarski/following{/other_user}","gists_url":"https://api.github.com/users/cbednarski/gists{/gist_id}","starred_url":"https://api.github.com/users/cbednarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbednarski/subscriptions","organizations_url":"https://api.github.com/users/cbednarski/orgs","repos_url":"https://api.github.com/users/cbednarski/repos","events_url":"https://api.github.com/users/cbednarski/events{/privacy}","received_events_url":"https://api.github.com/users/cbednarski/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":9,"state":"open","created_at":"2015-06-27T07:53:38Z","updated_at":"2015-06-30T00:23:23Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-06-30T00:19:34Z","updated_at":"2015-06-30T00:28:34Z","closed_at":null,"body":"Im currently running a local build based off (https://github.com/mitchellh/packer/commit/8657b1e9d81f147747122870032c81acb3bd663c) to test https://github.com/mitchellh/packer/pull/2320 and while 2320 looks good, there is an issue where the ephemeral block devices are not configured correctly.\r\n\r\nIn the 0.7.5 Block Device configuration that I would see as a result of the AMI building process would look something like this for the resulting image:\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sda1\t\tsnap-c2a1718d\t8\ttrue\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdb\tephemeral0\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdc\tephemeral1\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdd\tephemeral2\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sde\tephemeral3\r\n\r\nIn the 0.8+ version I am seeing the following:\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sda1\t\tsnap-2e113358\t8\ttrue\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sdb\t\t\t0\tfalse\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sdc\t\t\t0\tfalse\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sdd\t\t\t0\tfalse\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sde\t\t\t0\tfalse\tstandard\t\tNot Encrypted\r\n\r\nAs best I can tell this line \r\nhttps://github.com/mitchellh/packer/blob/master/builder/amazon/common/block_device.go#L50 where setting EBS should be based off of the VirtualName being one of the ephemeral device names.  \r\n\r\nI performed a local fix here(https://github.com/aspring/packer/commit/9db281ac0f8933fecb0db3b1f0e789944b055e3a), however, I am not entirely sure of its correctness.\r\n\r\nWIth this fix in place, I see the following:\r\nBLOCKDEVICEMAPPING\tEBS\t/dev/sda1\t\tsnap-1a210c69\t8\ttrue\tstandard\t\tNot Encrypted\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdb\tephemeral0\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdc\tephemeral1\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sdd\tephemeral2\r\nBLOCKDEVICEMAPPING\tEPHEMERAL\t/dev/sde\tephemeral3\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mitchellh/packer/issues/comments/116887099","html_url":"https://github.com/mitchellh/packer/issues/2360#issuecomment-116887099","issue_url":"https://api.github.com/repos/mitchellh/packer/issues/2360","id":116887099,"user":{"login":"cbednarski","id":649798,"avatar_url":"https://avatars.githubusercontent.com/u/649798?v=3","gravatar_id":"","url":"https://api.github.com/users/cbednarski","html_url":"https://github.com/cbednarski","followers_url":"https://api.github.com/users/cbednarski/followers","following_url":"https://api.github.com/users/cbednarski/following{/other_user}","gists_url":"https://api.github.com/users/cbednarski/gists{/gist_id}","starred_url":"https://api.github.com/users/cbednarski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbednarski/subscriptions","organizations_url":"https://api.github.com/users/cbednarski/orgs","repos_url":"https://api.github.com/users/cbednarski/repos","events_url":"https://api.github.com/users/cbednarski/events{/privacy}","received_events_url":"https://api.github.com/users/cbednarski/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T00:28:34Z","updated_at":"2015-06-30T00:28:34Z","body":"@aspring Thanks for the report. I think we need some more tests around this feature to verify it's working as intended. If you want to PR your fix I can look into adding tests to it."}}