简体   繁体   English

使用Azure CLI工具获取虚拟机列表时出错

[英]Error fetching vm list using azure cli tools

I'm using azure tools on mac OS X. I did run following commands : 我在Mac OS X上使用了Azure工具。我确实运行了以下命令:

1. $ azure login
2. $ azure account download
3. $ azure import .publishsettings
4. $ azure account set "subscription id"

But now when I run 但是现在当我跑步

$ azure vm list $ azure虚拟机列表

it shows following error : 它显示以下错误:

{ [Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.] code: 'ForbiddenError', statusCode: 403 }
Error: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
    at Function.ServiceClient._normalizeError (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/serviceclient.js:815:23)
    at /usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/services/filters/errorhandlingfilter.js:44:29
    at Request._callback (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/lib/http/request-pipeline.js:109:14)
    at Request.self.callback (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:199:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1160:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/azure-cli/node_modules/azure-common/node_modules/request/request.js:1111:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:944:16

Issue was with the subscription permission. 订阅权限存在问题。 You need to go to https://manage.windowsazure.com and add user as co-admin then add him owner on http://portal.azure.com . 您需要转到https://manage.windowsazure.com并将用户添加为共同管理员,然后在http://portal.azure.com上将其所有者添加。

Adding a user from http://portal.azure.com and making him owner, alone does not work. 仅从http://portal.azure.com添加用户并使其成为所有者是不起作用的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM