On Mon, Jun 26, 2017 at 09:55:31AM +0200, Xavier Lembo wrote: > I've tried today to use my jessie working script on the eu-west-1 stretch > ami (ami-e79f8781) > > My custom ami must have a specific size for first partition, so , i use a > specific block device mapping. > > On the Stretch AMI, it fails with message: > > amazon-ebs: Error launching source instance: InvalidBlockDeviceMapping: The > device 'xvda' is used in more than one block-device mapping > ==> amazon-ebs: status code: 400, request id: > ec5463c3-2498-4084-a1aa-825b24b07287 > > I've tried to check ebs differences between the working jessie ami and this > one > > and the difference is in the naming of the block device:
Are you able to launch a standalone instance of the stretch AMI? I don't think the issue is with the AMI's block-device mapping specifically. What's the block-device mapping configuration you're trying to specifiy with packer? My guess is that you're ending up specifying both "xvda" and "/dev/xvda" with packer, which is causing the conflict because they reference the same canonical device. I've verified that the strech AMI in eu-west-1 does launch correctly with its current block-device mapping settings: curl -s 169.254.169.254/latest/meta-data/placement/availability-zone ; echo eu-west-1a admin@ip-172-31-34-141:~$ curl -s 169.254.169.254/latest/meta-data/ami-id ; echo ami-e79f8781 admin@ip-172-31-34-141:~$ curl -s 169.254.169.254/latest/meta-data/block-device-mapping/ami/ ; echo xvda admin@ip-172-31-34-141:~$ curl -s 169.254.169.254/latest/meta-data/block-device-mapping/root/ ; echo xvda admin@ip-172-31-34-141:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 8G 0 disk └─xvda1 202:1 0 8G 0 part / Thanks noah
