我正在尝试从元数据中获取图像名称,但服务器的答案是空的。它在几天前工作。我尝试了旧的元数据 url 和新的
[root@mys-pike ~]# curl http://metadata/computeMetadata/v1beta1/instance/image
[root@mys-pike ~]# curl -is http://metadata/computeMetadata/v1beta1/instance/image
HTTP/1.1 200 OK
Content-Type: application/text
ETag: 3c19e4d76229ba8c
Date: Wed, 12 Jun 2013 14:56:46 GMT
Server: Metadata Server for VM
Content-Length: 0
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
[root@mys-pike ~]# curl http://metadata/0.1/meta-data/image
[root@mys-pike ~]# curl -is http://metadata/0.1/meta-data/image
HTTP/1.1 200 OK
Content-Type: application/text
Date: Wed, 12 Jun 2013 15:02:02 GMT
Server: Metadata Server for VM
Content-Length: 0
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
[root@mys-pike ~]# curl http://metadata/0.1/meta-data/instance-id
10970436504468444993