"An error occurred while retrieving the list of Virtual Machine Roles" in Windows Azure Pack 2013

Applies to: Windows Azure Pack (on Windows Server 2012 R2)

Symptoms


When you attempt to view a list of managed virtual machines (VMs) in Windows Azure Pack 2013, you receive the following error:

An error occurred while retrieving the list of Virtual Machine Roles

Additionally, searching for virtual machines may return the following error:

Virtual Machine Role Name is not available

Also, an event similar to the following may be present in the Microsoft-WindowsAzurePack-MgmtSvc-TenantSite event log:


Cause


This error can occur if the resource provider's passwords are out of sync in the Windows Azure Pack database.

Resolution


To resolve this issue, log on to the Windows Azure Pack AdminAPI server and run the following script in an elevated Windows PowerShell window:
$rp = Get-MgmtSvcResourceProviderConfiguration -Name 'systemcenter' -DecryptPassword
$rp.AdminEndpoint.AuthenticationPassword = <new password>
$rp.AdminEndpoint.AuthenticationUsername = <username>
Add-MgmtSvcResourceProviderConfiguration -ResourceProvider $rp -Force

Note Substitute the appropriate values for "<new password>" and "<username>."