Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Virtual machine 使用gcloud,如何查找虚拟机名称?_Virtual Machine_Gcloud - Fatal编程技术网

Virtual machine 使用gcloud,如何查找虚拟机名称?

Virtual machine 使用gcloud,如何查找虚拟机名称?,virtual-machine,gcloud,Virtual Machine,Gcloud,我尝试在登录到VM时使用gcloud命令查找Google云计算虚拟机名称 我在文档中搜索没有得到结果 谢谢 见 具体而言: curl\ --标题“元数据风格:谷歌”\ http://metadata.google.internal/computeMetadata/v1/instance/name 元数据服务是一个实现良好的API,您可以在资源树上下导航,例如,从上面的URL中删除最后的名称,枚举实例下的所有资源: curl\ --标题“元数据风格:谷歌”\ http://metadata.g

我尝试在登录到VM时使用gcloud命令查找Google云计算虚拟机名称

我在文档中搜索没有得到结果

谢谢

具体而言:

curl\
--标题“元数据风格:谷歌”\
http://metadata.google.internal/computeMetadata/v1/instance/name 
元数据服务是一个实现良好的API,您可以在资源树上下导航,例如,从上面的URL中删除最后的
名称
,枚举
实例
下的所有资源:

curl\
--标题“元数据风格:谷歌”\
http://metadata.google.internal/computeMetadata/v1/instance/
返回:

attributes/
cpu-platform
description
disks/
guest-attributes/
hostname
id
image
legacy-endpoint-access/
licenses/
machine-type
maintenance-event
name
network-interfaces/
preempted
remaining-cpu-time
scheduling/
service-accounts/
tags
virtual-clock/
zone
然后,您可以选择上述任何一项,将其附加到URL以继续浏览

中的文档同样全面,对于实例元数据,正如预期的那样,反映了GET'ing的响应

i、 e:

请参见

具体而言:

curl\
--标题“元数据风格:谷歌”\
http://metadata.google.internal/computeMetadata/v1/instance/name 
元数据服务是一个实现良好的API,您可以在资源树上下导航,例如,从上面的URL中删除最后的
名称
,枚举
实例
下的所有资源:

curl\
--标题“元数据风格:谷歌”\
http://metadata.google.internal/computeMetadata/v1/instance/
返回:

attributes/
cpu-platform
description
disks/
guest-attributes/
hostname
id
image
legacy-endpoint-access/
licenses/
machine-type
maintenance-event
name
network-interfaces/
preempted
remaining-cpu-time
scheduling/
service-accounts/
tags
virtual-clock/
zone
然后,您可以选择上述任何一项,将其附加到URL以继续浏览

中的文档同样全面,对于实例元数据,正如预期的那样,反映了GET'ing的响应

i、 e: