我正在重设Linux(Redhat) VM in ARM Azure
的密码。使用以下命令。
我收到如下错误...
PS C:\ WINDOWS \ system32> azure vm reset-access rgname vmname -u hadoop -p redhat @ 123 信息:
执行命令vm reset-access +查找VM“hadoop” +安装扩展“VMAccessForLinux”,VM:“hadoop” 错误:长时间运行操作失败并显示错误:'VM在处理扩展'VMAccessForLinu时报告失败 X'。错误消息:“启用失败。”。'。
info:错误信息已记录到C:\ Users \ Amitkumar.patil.azure \ azure.err 错误:vm reset-access命令失败
错误文件包含
2016-05-05T09:21:14.934Z:
{ [Error: Long running operation failed with error: 'VM has reported a failure when processing extension 'VMAccessForLinux'. Error message: "Enable failed.".'.]
stack: [Getter/Setter],
request:
{ rawResponse: false,
queryString: {},
method: 'GET',
headers: { 'user-agent': 'WindowsAzureXplatCLI/0.9.15' },
url: 'https://management.azure.com/subscriptions/75706c1b-8db8-49f6-8295-1c36c0b4e0c3/providers/Microsoft.Compute/locations/eastus/operations/72d61126-96e0-407d-a28e-b724d7efee6e?api-version=2015-06-15' },
response:
{ body: '{\r\n "operationId": "72d61126-96e0-407d-a28e-b724d7efee6e",\r\n "startTime": "2016-05-05T09:19:40.0598247+00:00",\r\n "endTime": "2016-05-05T09:20:59.4442674+00:00",\r\n "status": "Failed",\r\n "error": {\r\n "code": "VMExtensionProvisioningError",\r\n "message": "VM has reported a failure when processing extension \'VMAccessForLinux\'. Error message: \\"Enable failed.\\"."\r\n }\r\n}',
headers:
{ 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '378',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
'x-ms-served-by': '0309f20e-ba97-4cfa-a387-af57e4db0559_131067724814019554',
'x-ms-request-id': '4e2f8f12-06e7-4b8c-b76e-0e9706c7b490',
server: 'Microsoft-HTTPAPI/2.0, Microsoft-HTTPAPI/2.0',
'x-ms-ratelimit-remaining-subscription-reads': '14851',
'x-ms-correlation-request-id': 'a0e647c1-afda-4f0f-a02c-bc3cf0bced14',
'x-ms-routing-request-id': 'NORTHCENTRALUS:20160505T092114Z:a0e647c1-afda-4f0f-a02c-bc3cf0bced14',
date: 'Thu, 05 May 2016 09:21:14 GMT',
connection: 'close' },
statusCode: 200 },
message: 'Long running operation failed with error: \'VM has reported a failure when processing extension \'VMAccessForLinux\'. Error message: "Enable failed.".\'.',
code: 'VMExtensionProvisioningError',
body:
{ operationId: '72d61126-96e0-407d-a28e-b724d7efee6e',
startTime: '2016-05-05T09:19:40.0598247+00:00',
endTime: '2016-05-05T09:20:59.4442674+00:00',
status: 'Failed',
error:
{ code: 'VMExtensionProvisioningError',
message: 'VM has reported a failure when processing extension \'VMAccessForLinux\'. Error message: "Enable failed.".' } },
__frame:
{ name: 'createOrUpdateVMExtension__18',
line: 248,
file: 'C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\commands\\arm\\vm\\virtualMachine.js',
prev:
{ name: '_createOrUpdateExtension__38',
line: 1400,
file: 'C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI\\lib\\commands\\arm\\vm\\vmClient.js',
prev: [Object],
calls: 1,
active: false,
offset: 9,
col: 19 },
calls: 0,
active: false,
offset: 4,
col: 88 },
rawStack: [Getter] }
Error: Long running operation failed with error: 'VM has reported a failure when processing extension 'VMAccessForLinux'. Error message: "Enable failed.".'.
<<< async stack >>>
at createOrUpdateVMExtension__18 (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\arm\vm\virtualMachine.js:252:89)
at _createOrUpdateExtension__38 (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\arm\vm\vmClient.js:1409:20)
at setExtension__24 (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\arm\vm\vmClient.js:979:10)
at __26 (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\arm\vm\vm.js:555:18)
<<< raw stack >>>
at PollingState.getCloudError (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\lib\pollingState.js:119:15)
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\lib\azureServiceClient.js:133:38
at Object.async.whilst (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\node_modules\async\lib\async.js:621:13)
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\node_modules\async\lib\async.js:617:23
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\lib\azureServiceClient.js:109:20
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\lib\azureServiceClient.js:231:5
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\lib\azureServiceClient.js:399:12
at retryCallback (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\node_modules\ms-rest\lib\filters\exponentialRetryPolicyFilter.js:140:9)
at handleRedirect (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\ms-rest-azure\node_modules\ms-rest\lib\filters\redirectFilter.js:36:9)
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\util\utils.js:482:7
答案 0 :(得分:0)
如果我不得不猜测,我会说“ azure vm reset-access”命令有一个错误。然而,正如错误消息所暗示的那样,它只是在使用VMAccessForLinux扩展,因此您可以直接使用它来绕过该错误。
在Azure CLI 2.0中,命令如下所示:
az vm extension set -g YOUR_RESOURCE_GROUP_NAME --vm-name YOUR_LINUX_VM_NAME --publisher Microsoft.OSTCExtensions --name VMAccessForLinux --protected-settings '{"reset_ssh": true, "username": "YOUR_USERNAME", "password": "YOUR_NEW_PASSWORD"}'
自从我使用Azure CLI 1.0已经有一段时间了,但是如果我没记错的话,它有一个等效的azure vm extension set
命令,它使用相同的参数。
希望这会有所帮助!有关不同配置(更改ssh键等)的更多示例,请查看此博客文章: https://negatblog.wordpress.com/2018/07/03/changing-admin-credentials-of-vms-and-scale-sets/