简体   繁体   English

无法通过刀创建EC2实例

[英]unable to create EC2 instance through knife

I am creating an ec2 instance through knife . 我正在通过knife创建一个ec2实例。 i gave the following command to create 我给了以下命令来创建

knife ec2 server create -r "role[webserver]" -I ami-b84e04ea --flavor t1.micro --region ap-southeast-1 -G default -x ubuntu -N server01 -S ec2keypair

but getting error as Fog::Compute::AWS::Error: InvalidBlockDeviceMapping => iops must be specified with the volumeType of device '/dev/sda1' . 但是由于Fog :: Compute :: AWS :: Error:InvalidBlockDeviceMapping => iops必须使用设备'/ dev / sda1'的volumeType指定iops I am unable to solve this issue , Any help will be appreciated . 我无法解决此问题,将不胜感激。

Its possible that the ami you are trying to launch requires an EBS. 您尝试启动的AMI可能需要EBS。 With an EBS you can set the IOPS value which seems like it is not set and is giving you the issue. 使用EBS,您可以设置IOPS值,该值似乎没有设置,并且给您带来了问题。

Having a look at the documentation it seems you might need to add 看一下文档,看来您可能需要添加

--ebs-size 10
SIZE as an option.

I got that from the knife documentation http://docs.opscode.com/plugin_knife_ec2.html 我是从小刀文档http://docs.opscode.com/plugin_knife_ec2.html中获得的

Also taking a look at the source code for the knife ec2 plugin it looks like you can add. 还可以看一下您可以添加的刀ec2插件的源代码。

--ebs-optimized 
Enabled optimized EBS I/O

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM