2017-06-06 166 views
0

我想通过Powershell更改VMSS(服务Fabric群集节点)的密码。 VMSS的chnage密码进程出现以下错误。 错误后前来密码更改,但VMSS状态显示失败,Update-AzureRmVmss:长时间运行的操作失败,状态为'失败'。 ErrorCode:VMExtensionProvisioningError

Update-AzureRmVmss : Long running operation failed with status 'Failed'. 
ErrorCode: VMExtensionProvisioningError 
ErrorMessage: VM has reported a failure when processing extension 'ServiceProfilerAgent'. Error message: "Failed to launch diagnostic agent. The agent output: $Unpacking resources... 
Executing Service Profiler Agent version 1.0.41004.1 with arguments: --mode AzureVMExtension --vmextsettings 1.settings 
Welcome to Service Profiler - to exit the program press 'Ctrl+C'. 
Initializing agent... 
Loading settings from cloud storage. Settings name: default 
The settings file 'default-settings.json' was not found in storage. 
Account name: appperformance 
Container name: sp-agent-settings 
Blob name: default-settings.json 
There was a problem loading the settings. Failed to load settings from cloud storage. 
". 
StartTime: 6/4/2017 10:58:11 AM 
EndTime: 6/4/2017 10:58:16 AM 
OperationID: a0bfeb48-2da0-4dea-8e73-9137d11b0351 
Status: Failed 
At line:1 char:1 
+ Update-AzureRmVmss -ResourceGroupName $vmssResourceGroup -Name $vmssName -Virtua ... 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [Update-AzureRmVmss], ComputeCloudException 
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.Common.ComputeCloudException,Microsoft.Azure.Commands.Compute.Automation.UpdateAzureRmVmss 

我已经成功地改变了VMSS规模设置的密码,但这个错误出现。 我的VMSS状态显示失败,但仍然运行我的服务结构群集。

以下是我用来更改VMSS密码的命令。

Login-AzureRmAccount 
$vmssName = "node" 
$vmssResourceGroup = "RG" 
publicConfig = @{"UserName" = "username"} 
$privateConfig = @{"Password" = "Password"} 
$extName = "VMAccessAgent" 
$publisher = "Microsoft.Compute" 
$vmss = Get-AzureRmVmss -ResourceGroupName $vmssResourceGroup -VMScaleSetName $vmssName 
$vmss = Add-AzureRmVmssExtension -VirtualMachineScaleSet $vmss -Name $extName -Publisher $publisher -Setting $publicConfig -ProtectedSetting $privateConfig -Type $extName -TypeHandlerVersion "2.0" -AutoUpgradeMinorVersion $true 
Update-AzureRmVmss -ResourceGroupName $vmssResourceGroup -Name $vmssName -VirtualMachineScaleSet $vmss 
+0

VMSS实例OS是Linux还是windows? –

+0

windows ....... –

+0

我无法重现您的错误消息,请您再次运行此脚本吗?您的VMSS中有多少个实例,是否启用了自动缩放? –

回答

0

似乎探查器代理无法连接到存储帐户来下载设置文件。

您可以检查存储帐户是否仍然存在或存储连接已更改吗?

如果有任何更改,您可以更新https://www.azureserviceprofiler.com/中的存储帐户,并使用更新的存储帐户重新运行部署脚本。

如果您决定停止分析,还可以删除Microsoft.VisualStudio.ServiceProfiler/ServiceProfilerAgent扩展。

希望这会有所帮助! :)