[Compute] [Azure German Cloud] - Get-AzureRmVm (Microsoft.Compute) API Error
Description
Trying to execute command "Get-AzureRMVM" @azuregermancloud (Germany Central) recieving following error code. Tested in other subscriptions, tendants and clients, every time the same error. No Issues in Azure Europe or others. Worked two weeks ago fine in germancloud for sure - nothing changed.. Get-AzureRmStorageAccount and others also working fine.. only issue with compute..
### Script/Steps for Reproduction
<!-- Please provide the necessary script(s) that reproduce the issue -->
```powershell
Get-AzureRmVm
Module Version
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 6.4.0 AzureRM
Script 6.3.0 AzureRM
Script 6.1.0 AzureRM
Environment Data
Name Value
---- -----
PSVersion 5.1.17134.112
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.112
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Debug Output
DEBUG: 10:37:22 AM - GetAzureVMCommand begin processing with ParameterSet 'ListAllVirtualMachinesP
aramSet'.
DEBUG: 10:37:22 AM - using account id 'account-deleted'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'accountdeleted', envi
ronment: 'AzureGermanCloud', tenant: 'tendantid-deleted'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - AcquireTokenHandlerBase: === To
ken Acquisition started:
Authority: https://login.microsoftonline.de/tenantid/
Resource: https://management.core.cloudapi.de/
ClientId: removedclientid
CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (3 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: - TokenCache: Deserialized 3 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - TokenCache: Looking up cache fo
r a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - TokenCache: An item matching th
e requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - TokenCache: 25.9491590666667 mi
nutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - TokenCache: A matching item (ac
cess token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: b39e68d0-ee79-44c2-8a7b-012b2a10e37a - AcquireTokenHandlerBase: === To
ken Acquisition finished successfully. An access token was retuned:
Access Token Hash: 7Z/QwAMdZJfe/9TWVSbGyaj2KlSEhNZhsPEG9QaIsOQ=
Refresh Token Hash: f32V2SrQEDK+/SXjZV7T4gOT1bPq3hqZYnRVDadtAyc=
Expiration Time: 07/05/2018 09:03:19 +00:00
User Hash: V/2UNjDeJVNcKCFNTH6gtIMF5InPi15Daypun/Hzdi4=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - AcquireTokenHandlerBase: === To
ken Acquisition started:
Authority: https://login.microsoftonline.de/tenantid/
Resource: https://management.core.cloudapi.de/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (3 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: - TokenCache: Deserialized 3 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - TokenCache: Looking up cache fo
r a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - TokenCache: An item matching th
e requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - TokenCache: 25.9490591516667 mi
nutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - TokenCache: A matching item (ac
cess token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 07/05/2018 08:37:22: 0e329dad-67d1-4977-bcd6-1f096f539be1 - AcquireTokenHandlerBase: === To
ken Acquisition finished successfully. An access token was retuned:
Access Token Hash: 7Z/QwAMdZJfe/9TWVSbGyaj2KlSEhNZhsPEG9QaIsOQ=
Refresh Token Hash: f32V2SrQEDK+/SXjZV7T4gOT1bPq3hqZYnRVDadtAyc=
Expiration Time: 07/05/2018 09:03:19 +00:00
User Hash: V/2UNjDeJVNcKCFNTH6gtIMF5InPi15Daypun/Hzdi4=
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.microsoftazure.de/subscriptions/"DeletedSubscriptionID"/providers/
Microsoft.Compute/virtualMachines?api-version=2018-04-01
Headers:
x-ms-client-request-id : 3b588183-86ef-4512-a475-8ec2bfce179a
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
NotFound
Headers:
Pragma : no-cache
x-ms-failure-cause : gateway
x-ms-request-id : 52b3d317-5a14-4e01-86bc-aa929bf7c6e2
x-ms-correlation-request-id : 52b3d317-5a14-4e01-86bc-aa929bf7c6e2
x-ms-routing-request-id : GERMANYCENTRAL:20180705T083722Z:52b3d317-5a14-4e01-86bc-aa929bf7c6
e2
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Cache-Control : no-cache
Date : Thu, 05 Jul 2018 08:37:22 GMT
Body:
{
"error": {
"code": "InvalidResourceType",
"message": "The resource type 'virtualMachines' could not be found in the namespace 'Microsoft
.Compute' for api version '2018-04-01'. The supported api-versions are '2015-05-01-preview,2015-06
-15,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01'."
}
}
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmVM; IsSuccess - True; Duration - 00:00:00.1329435;
Exception - ;
DEBUG: Finish sending metric.
DEBUG: 10:37:23 AM - GetAzureVMCommand end processing.
DEBUG: 10:37:23 AM - GetAzureVMCommand end processing.
Get-AzureRmVm : The resource type 'virtualMachines' could not be found in the namespace
'Microsoft.Compute' for api version '2018-04-01'. The supported api-versions are
'2015-05-01-preview,2015-06-15,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01'.
ErrorCode: InvalidResourceType
ErrorMessage: The resource type 'virtualMachines' could not be found in the namespace
'Microsoft.Compute' for api version '2018-04-01'. The supported api-versions are
'2015-05-01-preview,2015-06-15,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01'.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 52b3d317-5a14-4e01-86bc-aa929bf7c6e2
At line:1 char:1
+ Get-AzureRmVm
+ ~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmVM], ComputeCloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.GetAzureVMCommand
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmVM; IsSuccess - False; Duration - 00:00:00.1329435;
Exception - Microsoft.Azure.Commands.Compute.Common.ComputeCloudException: The resource type 'vir
tualMachines' could not be found in the namespace 'Microsoft.Compute' for api version '2018-04-01'
. The supported api-versions are '2015-05-01-preview,2015-06-15,2016-03-30,2016-04-30-preview,2016
-08-30,2017-03-30,2017-12-01'.
ErrorCode: InvalidResourceType
ErrorMessage: The resource type 'virtualMachines' could not be found in the namespace 'Microsoft.C
ompute' for api version '2018-04-01'. The supported api-versions are '2015-05-01-preview,2015-06-1
5,2016-03-30,2016-04-30-preview,2016-08-30,2017-03-30,2017-12-01'.
StatusCode: 404
ReasonPhrase: Not Found
OperationID : 52b3d317-5a14-4e01-86bc-aa929bf7c6e2 ---> Microsoft.Rest.Azure.CloudException: The r
esource type 'virtualMachines' could not be found in the namespace 'Microsoft.Compute' for api ver
sion '2018-04-01'. The supported api-versions are '2015-05-01-preview,2015-06-15,2016-03-30,2016-0
4-30-preview,2016-08-30,2017-03-30,2017-12-01'.
at Microsoft.Azure.Management.Compute.VirtualMachinesOperations.<ListAllWithHttpMessagesAsync>d
__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task tas
k)
at Microsoft.Azure.Commands.Compute.GetAzureVMCommand.<ExecuteCmdlet>b__25_0()
at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
--- End of inner exception stack trace ---
at Microsoft.Azure.Commands.Compute.ComputeClientBaseCmdlet.ExecuteClientAction(Action action)
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 10:37:23 AM - GetAzureVMCommand end processing.
DEBUG: 10:37:23 AM - GetAzureVMCommand end processing.
@hyonholee @nibhat hey guys, do you know if the latest Compute API has rolled out to the German cloud?
Has there been any update on when this API is going to roll out? This issue appears to affect pretty much every specialized cloud.
Cleaning up old issues from 2016 - 2018. Please reopen this issue if it is still a concern.