Amazon ec2 packer构建AmazonChroot-简单示例不起作用
我正在尝试使用Packer构建Amazon AMI centos。我正在使用AmazonChrootBuilder ami存在,但是我得到了构建错误Amazon ec2 packer构建AmazonChroot-简单示例不起作用,amazon-ec2,amazon,vagrant,packer,Amazon Ec2,Amazon,Vagrant,Packer,我正在尝试使用Packer构建Amazon AMI centos。我正在使用AmazonChrootBuilder ami存在,但是我得到了构建错误 [root@ip-10-32-11-16 retel-base]# packer build retel-base.json amazon-chroot output will be in this color. ==> amazon-chroot: Gathering information about this EC2 instanc
[root@ip-10-32-11-16 retel-base]# packer build retel-base.json
amazon-chroot output will be in this color.
==> amazon-chroot: Gathering information about this EC2 instance...
==> amazon-chroot: Inspecting the source AMI...
==> amazon-chroot: Couldn't find root device!
Build 'amazon-chroot' errored: Couldn't find root device!
==> Some builds didn't complete successfully and had errors:
--> amazon-chroot: Couldn't find root device!
==> Builds finished but no artifacts were created.
cat retel-base.json
{
"variables": {
"ACCESS_KEY_ID": "{{env `ACCESS_KEY_ID`}}",
"SECRET_ACCESS_KEY": "{{env `SECRET_ACCESS_KEY`}}"
},
"builders": [{
"type": "amazon-chroot",
"access_key": "{{user `ACCESS_KEY_ID`}}",
"secret_key": "{{user `SECRET_ACCESS_KEY`}}",
"source_ami":"ami-a40df4cc",
"ami_name": "base image built with packer {{timestamp}}"
}]
}我认为这可能与根设备的名称和块设备映射不匹配有关 在官方的CentOS AMIs中,根设备名为
/dev/sda
,但块设备映射仅列出/dev/sda1
,这显然是根设备上的分区
Netflix的Aminator在分区卷方面也有类似的问题:好的,那么我在这里有什么地方做错了吗?我可以再试一次。在他们当前的状态下,该AMI与Packer不兼容。我不知道如何把它转换成一个真实的。你可以试试别的。