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
返回的错误是:
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区域中提供)
答案 0 :(得分:2)
正如@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)虚拟化。
中详细了解差异