2016-09-26 40 views
-1
aws ec2 run-instances --region us-west-2 --image-id ami-d732f0b7 --count 1 --instance-type t1.micro --security-groups launch-wizard-1 --key-name key-name 

返回的錯誤是:AWS CLI工具無法啓動t1.micro實例

An error occurred (InvalidParameterCombination) when calling the RunInstances operation: Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type. 

然而,從Web控制檯我能夠使用相同的Ubuntu的形象推出了t1.micro實例(在us-west-2地區提供)

+1

確定嗎? 't1.micro'對於'us-west-2'中的相同AMI是灰色的。 – helloV

+0

@helloV http://s13.postimg.org/824mrd8fb/lol.png – bawejakunal

+2

圖像顯示't2.micro'(目前的gen),但在CLI中,你傳遞了't1.micro'(前一代) – helloV

回答

2

as @helloV提到t1.micro已被禁用。您可以在這個特別的AMI檢查細節:

aws> ec2 describe-images --image-ids ami-d732f0b7 --region us-west-2 
{ 
    "Images": [ 
     { 
      "VirtualizationType": "hvm", 
      "Name": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20160714", 
      "Hypervisor": "xen", 
      "SriovNetSupport": "simple", 
      "ImageId": "ami-d732f0b7", 
      "State": "available", 
      "BlockDeviceMappings": [ 
       { 
        "DeviceName": "/dev/sda1", 
        "Ebs": { 
         "DeleteOnTermination": true, 
         "SnapshotId": "snap-47713105", 
         "VolumeSize": 8, 
         "VolumeType": "gp2", 
         "Encrypted": false 
        } 
       }, 
       { 
        "DeviceName": "/dev/sdb", 
        "VirtualName": "ephemeral0" 
       }, 
       { 
        "DeviceName": "/dev/sdc", 
        "VirtualName": "ephemeral1" 
       } 
      ], 
      "Architecture": "x86_64", 
      "ImageLocation": "099720109477/ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20160714", 
      "RootDeviceType": "ebs", 
      "OwnerId": "099720109477", 
      "RootDeviceName": "/dev/sda1", 
      "CreationDate": "2016-07-15T10:37:25.000Z", 
      "Public": true, 
      "ImageType": "machine" 
     } 
    ] 
} 

的關鍵是"VirtualizationType": "hvm"所以這個AMI僅支持硬件虛擬機(HVM)虛擬化類型。

t1(和其他第一代AMI)實例支持準虛擬(PV)虛擬化。

您可以閱讀更多關於aws documentation的差異