Amazon web services 如何使用AWS工具在AWS中注册快照支持的AMI?

Amazon web services 如何使用AWS工具在AWS中注册快照支持的AMI?,amazon-web-services,amazon-ec2,Amazon Web Services,Amazon Ec2,我试着这样做: aws ec2 register-image --architecture x86_64 \ --description XXX --name XXX \ --sriov-net-support simple --ena-support \ --virtualization-type hvm \ --block-device-mappings \ '[{"DeviceName": "/dev/sda","Ebs": {"SnapshotId": "snap

我试着这样做:

aws ec2 register-image --architecture x86_64 \
  --description XXX --name XXX \
  --sriov-net-support simple --ena-support \
  --virtualization-type hvm \
  --block-device-mappings \
    '[{"DeviceName": "/dev/sda","Ebs": {"SnapshotId": "snap-XXXX"}}]' \
  --root-device-name /dev/sda1
我有一条错误信息:

An error occurred (InvalidBlockDeviceMapping)
when calling the RegisterImage operation: Invalid device name /dev/sda

这里出了什么问题?

硬件虚拟机(HVM)AMI中的块设备映射可能因AMI而异

我相信如果您尝试块地址,例如
/dev/xvdb
,它将正常工作

参考: