[英]How to create a VM instance on GCP from a snapshot using the nodejs google-cloud/compute tool
I'm setting up a web-app in which which when a user registers a new GCP vm instance is created, I know how to make a completely new one by just specifying OS but I want to know how to make one from a snapshot and configure it. 我正在建立一个网络应用程序,当用户注册一个新的GCP vm实例时,我知道如何通过指定操作系统来创建一个全新的实例,但我想知道如何从快照创建一个配置它。
I,ve tried simply putting the JSON in the REST API provided by GCP in the website, into my js program but it doesnt work. 我试过简单地将JSON放在网站上由GCP提供的REST API中,放到我的js程序中,但它不起作用。
Compute Engine REST API有一个名为disks [] .initializeParams.sourceSnapshot的字段,您可以将其作为请求的一部分发送,以包含应从中创建实例磁盘的快照。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.