我正在尝试通过 Powershell 更改 VMSS(Service Fabric 群集节点)的密码。VMSS的chnage密码的过程带有以下错误。错误后密码更改但VMSS状态显示失败,
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