简体   繁体   English

如何使用nodejs google-cloud / compute工具从快照在GCP上创建VM实例

[英]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.

相关问题 我如何使用node.js函数检查我的VM实例在google-cloud中使用了多少CPU和内存 - How can I check how many CPUs and memory my vm instance uses in google-cloud using node.js function 在GCE实例中放置一段时间后,@ google-cloud / logging-winston没有从NodeJS登录 - @google-cloud/logging-winston not logging from NodeJS after some time inside a GCE instance Node.js在Google Cloud /日志中编写protopayload - nodejs writing protopayload in google-cloud/logging 如何使用Google PubSub(@ google-cloud / pubsub)进行确认 - How to ACK using Google PubSub (@google-cloud/pubsub) 如何使用玩笑模拟@google-cloud/kms - How to mock @google-cloud/kms using jest 如何使用 google-cloud 和 node js 从 firebase 存储中检索图像并将其显示在网页上 - how to retrieve image from firebase storage and display it on a webpage using google-cloud and node js 如何从@google-cloud/storage 读取文件? - How to read file from @google-cloud/storage? 如何使用内部IP从Google Cloud Functions连接到我的Compute Engine MongoDB实例? - How to connect to my Compute Engine MongoDB instance from Google Cloud Functions using the internal IP? 如何使用node.js通过GCP Cloud Function更改VM /实例标签? - How can I change a VM/Instance label with GCP Cloud Function using node.js? 如何从Google Cloud Function中的快照创建磁盘-Node.js - How to create disk from snapshot in google cloud function - node js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM