问题描述
我正在尝试从GCE VM分离启动盘.由于虚拟机已停止,因此应该允许我分离它,但它会返回此错误
I am trying to detach the Boot Disk from a GCE VM. As the VM is stopped so it should allow me to detach it but it's returning this error
UNSUPPORTED_OPERATION: Hot-remove of the root disk is not supported.
有什么建议吗?
推荐答案
更新的答案
自 2019年1月24日起,GCE已添加了以下功能:从GA中已停止的VMs 分离并重新附加启动磁盘
Updated answer
As of 24 Jan 2019, GCE added the ability to detach and reattach boot disks from stopped VMs in GA.
如果从停止的VM分离启动磁盘,则无法重新启动VM备份,因此该操作没有意义.
If you detach the boot disk from a stopped VM, there's no way to restart the VM back up, so that operation does not make sense.
因此,您需要禁用选项>自动删除启动磁盘" 并删除虚拟机:
Thus, you would need to disable the option "auto-delete boot disk" and delete the VM:
gcloud compute instances set-disk-auto-delete INSTANCE \
[--auto-delete | --no-auto-delete] --disk DISK --zone ZONE
或者,您也可以在Developers Console的VM详细信息页面上通过单击VM实例名称,然后取消选中此选项来更改此设置:
Alternatively, you can also change this setting on the VM details page from the Developers Console by clicking on the VM instance name, and then unchecking this option:
这篇关于从GCE VM分离启动磁盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!