使用v1 API引导时,我的Google Compute Engine实例挂起 [英] My Google Compute Engine instances hang during boot using the v1 API
问题描述
在串行控制台中,我看到:
In the serial console, I see:
<snip>
Booting from Hard Disk...
Booting from 0000:7c00
…实例挂起
使用v1
API专门创建实例会导致挂起:
Specifically creating the instance with the v1
API results in a hang:
API_VERSION = 'v1'
gce_service = build('compute', API_VERSION)
...
request = gce_service.instances().insert(
project=PROJECT_ID, body=instance, zone=DEFAULT_ZONE)
使用v1beta16
API创建实例时,启动成功:
While creating the instance with the v1beta16
API boots successfully:
API_VERSION = 'v1beta16'
gce_service = build('compute', API_VERSION)
...
request = gce_service.instances().insert(
project=PROJECT_ID, body=instance, zone=DEFAULT_ZONE)
推荐答案
您可能会遇到此问题,因为与v1beta16
API相比,在v1
API中处理内核的方式有所变化.在v1beta16
中,Compute Engine在启动时注入了Google提供的内核.从v1
开始,Compute Engine现在使用启动映像或永久磁盘中的备用内核.这样可以提供更大的灵活性,但是确实需要一次手动步骤来更新在v1
之前创建的永久性磁盘和映像.您可以使用过渡指南中提供的详细步骤来帮助您更新您的磁盘或映像.
You may experience this issue because of changes in how kernels are handled in the v1
API compared to the v1beta16
API. In v1beta16
, Compute Engine injected a Google-supplied kernel at boot time. As of v1
, Compute Engine now uses stock kernels from the boot image or persistent disk. This allows far more flexibility, but does require a one time manual step to update persistent disks and images created before v1
. You can use the detailed steps provided in the transition guide to help you update your disk or image.
如果您只需要快速启动实例,则可以使用已弃用的v1beta16
API来启动.使用gcutil
的示例:
If you just need to start your instances quickly, you can use the deprecated v1beta16
API to do so. Example using gcutil
:
$ gcutil addinstance INSTANCE_NAME --disk=DISK_NAME,boot --service_version=v1beta16
这篇关于使用v1 API引导时,我的Google Compute Engine实例挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!