【问题标题】:AWS:Device Name Error when converting from Elastic Beanstalk instance from m3.xlarge to m4.xlargeAWS:将 Elastic Beanstalk 实例从 m3.xlarge 转换为 m4.xlarge 时出现设备名称错误
【发布时间】:2018-02-28 03:37:38
【问题描述】:

我有一个使用 m3.xlarge EC2 实例的 Elastic Beanstalk 应用程序。

我想尝试使用 m4.xlarge,所以我克隆了我的 EB 实例。然后,一旦它运行,我单击 Change Configuration 并将 Instance Type 更改为 m4.xlarge 但这会出现以下错误

Invalid root device name: '/dev/sda1', expecting: '/dev/xvda'.

为什么会出现这个错误?

我找到了这篇文章

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html

它提供了一些背景信息,但我仍然不知道如何处理此错误。

【问题讨论】:

    标签: amazon-web-services amazon-ec2 amazon-elastic-beanstalk


    【解决方案1】:

    原来问题是一个 ebextension 脚本,当时没有意识到它们被检查过,但我已经配置了一个更大的根磁盘,并且在那里它引用了 /dev/sda1

    Resources:
        AWSEBAutoScalingLaunchConfiguration:
            Type: AWS::AutoScaling::LaunchConfiguration
            Properties:
                BlockDeviceMappings:
                   - DeviceName: /dev/sda1
                     Ebs:
                         VolumeSize:
                            35
    

    相应地更改它可以解决问题:

    Resources:
        AWSEBAutoScalingLaunchConfiguration:
            Type: AWS::AutoScaling::LaunchConfiguration
            Properties:
                BlockDeviceMappings:
                   - DeviceName: /dev/xvda
                     Ebs:
                         VolumeSize:
                            35
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-12
      • 1970-01-01
      • 2019-11-23
      • 1970-01-01
      • 1970-01-01
      • 2020-01-01
      • 2023-01-30
      • 2016-04-07
      相关资源
      最近更新 更多