是否可以在不停机的情况下复制 AWS EC2 实例?
我有一个 AWS EC2 实例,我想创建一个衍生实例以进行一些测试。我知道我可以创建正在运行的实例的 AMI,然后启动它。但是当我创建 AMI 时,机器会停机几分钟(至少是网络连接)。
我是否缺少某个地方的设置?
我通过在管理控制台中右键单击计算机并选择“创建 AMI”来生成 AMI。
谢谢
I've got an AWS EC2 instance that I would like to create a spin off of in order to do some testing. I know I can create an AMI of the running instance, then launch that. But when I create the AMI, the machine goes down for a couple minutes (at least the network connection).
Is there a setting somewhere that I am missing?
I generate the AMI by right clicking the machine in the management console and selecting "Create AMI."
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,不是技术意义上的。创建 AMI 时必须重新启动计算机。您并没有失去网络连接,您的计算机实际上正在重新启动。
您可以做的一件事是将磁盘复制到另一个磁盘,但这并不容易做到。
编辑:
我再次查看这个答案,AWS 现在能够在创建 AMI 时检查“不重新启动”。对于有大量写入的卷来说,这可能不是一个好主意,但有它很好。
No. Not in a technical sense. The machine must reboot when you create an AMI. You are not losing network connection, your machine is actually restarting.
One thing you could do is copy your disk to another disk, but that is not easy to do.
EDIT:
I am looking at this answer again, and AWS now has the ability to check "no reboot" when creating an AMI. This is probably not a great idea for volumes with a lot of writes, but it is nice to have.
Amazon 现在允许在创建 AMI 时使用“不重新启动”选项,该选项显示在复选框中。但是,“无法保证所创建映像的文件系统完整性”,因此您必须权衡完整性与停机时间。
http://docs.amazonwebservices。 com/AWSEC2/2011-05-15/UserGuide/index.html?Tutorial_CreateImage.html
http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference -cmd-CreateImage.html
Amazon now allows a "no-reboot" option when creating an AMI, presented in a checkbox. However, the "file system integrity on the created image can't be guaranteed" so you'll have to weigh the integrity vs. downtime.
http://docs.amazonwebservices.com/AWSEC2/2011-05-15/UserGuide/index.html?Tutorial_CreateImage.html
http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-CreateImage.html