【问题标题】:EC2 small to micro instance downgrade problemsEC2 小到微实例降级问题
【发布时间】:2010-09-18 02:51:37
【问题描述】:

有一些应用程序的 EC2 小型实例太大了。所以微实例的发布正是医生所吩咐的。

我想获取一个小型实例的 EBS 卷,将其分离,然后将其与一个微型实例配对。在某些时候,换一种方式将微实例升级到更小的或更大的大小可能会很棒。

我尝试了这个失败的实验:

  1. 使用 Alestic Ubuntu 10.04 32 位 AMI (ami-1234de7b) 创建一个新的小型实例。靴子很有魅力。
  2. 关闭新创建的微型实例,分离在上一步中为我创建的卷。
  3. 将小型实例的卷附加到微型实例。
  4. 加电。
  5. 纳达。

奇怪的是没有控制台日志输出直到我关机。然后我就看到了。

[    0.000000] Reserving virtual address space above 0xf5800000
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
...
[    1.221261] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[    1.221261] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[    1.222164] devtmpfs: mounted
[    1.222202] Freeing unused kernel memory: 216k freed
[    1.223409] Write protecting the kernel text: 4328k
[    1.223760] Write protecting the kernel read-only data: 1336k
init: console-setup main process (63) terminated with status 1
%Ginit: plymouth main process (45) killed by SEGV signal
init: plymouth-splash main process (196) terminated with status 2
cloud-init running: Thu, 09 Sep 2010 17:37:54 +0000. up 2.61 seconds
mountall: Disconnected from Plymouth
init: hwclock-save main process (291) terminated with status 1
Checking for running unattended-upgrades:  * Asking all remaining processes to terminate...       
[80G 
[74G[ OK ]
 * All processes ended within 1 seconds....       
[80G 
[74G[ OK ]
 * Deconfiguring network interfaces...       
[80G 
[74G[ OK ]
 * Deactivating swap...       
[80G 
[74G[ OK ]
 * Unmounting local filesystems...       
[80G 
[74G[ OK ]
 * Will now halt
[  185.599636] System halted.

这种交换方法在过去相同大小的实例之间运行良好,这是我第一次尝试在不同大小之间进行此操作。这是不可能的,还是我错过了我的 EC2 知识中的一些基本知识?

【问题讨论】:

    标签: amazon-ec2


    【解决方案1】:

    尽管这可能会迁移到服务器故障,但我今天早些时候遇到了与此实例完全相同的问题。

    看起来这个图像assumes that there will be ephemeral storage present,当微实例上没有时。要解决此问题,请在 /etc/fstab 中注释掉以下行:

    /dev/sda2   /mnt    auto    defaults,comment=cloudconfig    0   0
    

    这应该可以防止实例在启动时挂起,或者至少它对我来说是 ami-1234de7b。

    【讨论】:

      【解决方案2】:

      我使用 alestic ami (ami-2c354b7e) 创建了一个新的微实例。我第一次能够正常登录系统。但是一旦我重新启动系统,我就无法再次登录。

      评论上面指出的行对我有用。 "/dev/sda2 /mnt 自动默认值,comment=cloudconfig 0 0"

      【讨论】:

        【解决方案3】:

        注释掉这条线并不能完全解决它。如果您重新启动,它将重新写入相同的行。您需要:

        $ l="deb http://archive.ubuntu.com/ubuntu lucid-proposed main"
        $ echo "$l" | sudo tee -a /etc/apt/sources.list
        $ sudo apt-get update && sudo apt-get install cloud-init
        $ dpkg-query --show cloud-init
        

        我假设这将很快在 Ubuntu 官方版本中得到修复,您不必这样做,但现在......

        来源:https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/634102

        此外,我们还有一些基于官方 Ubuntu AMI 的图像,可在 Micro 上运行:http://blog.simpledeployr.com/2010/09/new-ruby-amis-with-latest-ubuntu-lucid.html

        【讨论】:

          【解决方案4】:

          我认为您没有问题。这可能是亚马逊基础设施中的一个问题。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2018-11-17
            • 2013-08-08
            • 2015-08-30
            • 2022-11-24
            相关资源
            最近更新 更多