如何休眠Google Compute Engine服务器? [英] How can I hibernate a Google Compute Engine server?

查看:106
本文介绍了如何休眠Google Compute Engine服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用GCE服务器和VNC运行我编写的某些桌面程序.但是,我不想让GCE服务器一直运行(以节省金钱),并且希望VNC桌面的设置能够持久保存(以节省时间).似乎最简单的方法是使GCE实例休眠.是否可以通过脚本或命令行来执行此操作?

I'd like to use a GCE server and VNC to run some desktop programs I've written. However, I'd like to not have the GCE server running all the time (to save money) and I'd like to have the setup of my VNC desktop persisted (to save time). It seems like the easiest way to accomplish this is to somehow hibernate the GCE instance. Is there a way to do this either from a script or from the command line?

推荐答案

我知道的当前唯一受支持的技术是使用可引导的永久磁盘,该磁盘比虚拟机的寿命更长,因此您可以删除并重新启动VM.启动时间适中(低于30秒),但我认为这不能满足您的需求,因为除非您的应用程序内置了强大的检查点/恢复逻辑,否则您可能无法在桌面上停下来的地方继续工作

The only currently supported technique that I'm aware of would be to use a bootable persistent disk, which outlives the virtual machine so you could delete and restart the VM with moderately quick (under 30s) startup time but I don't think that would meet your needs because unless your app has built-in, robust checkpoint/resume logic, you might not be able to pick up where you left off on the desktop.

另一种解决方法是使用轻量级容器,例如 Docker ,该容器具有暂停/恢复和其设计中内置了检查点.您目前无法在Google Compute Engine上运行Docker容器,但我们有兴趣探索Docker在GCE上的潜力,请继续关注.

Another way to approach this would be to use a lightweight container, like Docker, which has suspend/resume and checkpointing built into its design. You can't currently run Docker containers on Google Compute Engine but we're interested in exploring the potential of Docker on GCE so stay tuned.

您真正想要的声音是本机挂起功能,具有近乎瞬时的恢复功能,并且对于处于挂起状态的VM而言,其费用不高或非常低.我认为这是一个有趣的想法-我已向Compute Engine工程团队提交了内部功能请求,以供将来考虑.

Sounds like what you'd really like is a native suspend capability with near instantaneous resume and no or very low charge for VMs in the suspended state. I think that's an interesting idea - I've submittted an internal feature request to the Compute Engine engineering team for future consideration.

这篇关于如何休眠Google Compute Engine服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆