我正在使用AWS创建EC2实例。我可以使用此配置附加额外的SSD驱动器。
'BlockDeviceMappings' => array(
array(
'VirtualName' => 'data_volume',
'DeviceName' => '/dev/sdg',
'Ebs' => array(
'VolumeSize' => 2,
'VolumeType' => 'gp2'
)
),
但是我无法将根设备变为SSD设备。我尝试了 VolumeType 和 RootDeviceType 参数,但它们没有用。
对此有何解决方案?
答案 0 :(得分:0)
您当然可以从控制台使用EBS SSD根卷创建ec2实例。我通常使用Ruby SDK,如下所示:
ec2.instances.create(:image_id => 'image', :key_name => 'key', :instance_type => 'class', :security_groups => 'group', :count => 1, :block_device_mappings => [{:device_name => '/dev/sda1', :ebs => {:volume_size => 10, :volume_type => 'gp2'}}])