Files
tldr/pages.zh/common/gcloud-compute.md

37 lines
883 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gcloud 计算
> 在 Google Cloud 基础设施上创建、运行和管理虚拟机VM
> 另请参见:`gcloud`。
> 更多信息:<https://cloud.google.com/sdk/gcloud/reference/compute>。
- 列出计算引擎区域:
`gcloud compute zones list`
- 创建一个虚拟机实例:
`gcloud compute instances create {{instance_name}}`
- 显示虚拟机实例的详细信息:
`gcloud compute instances describe {{instance_name}}`
- 列出项目中的所有虚拟机实例:
`gcloud compute instances list`
- 创建持久磁盘的快照:
`gcloud compute disks snapshot {{disk_name}} --snapshot-names {{snapshot_name}}`
- 显示快照的详细信息:
`gcloud compute snapshots describe {{snapshot_name}}`
- 删除快照:
`gcloud compute snapshots delete {{snapshot_name}}`
- 使用 SSH 连接到虚拟机实例:
`gcloud compute ssh {{instance_name}}`