Total Pageviews

Search This Blog

Saturday, October 17, 2020

D365 FO Tips - How To retrieve Tier 2 Sandbox VM Size and other details using Azure REST Metadata API

 Greetings Friends!

Thought to share an interesting find. For a customer of mine, I was trying to find out the VM Size for a Tier-2 Sandbox UAT VM


As you all are aware, Microsoft is slowly restricting and discontinuing direct RDP access to any of your VMs.


However, I still have access to few of my customers UAT VM who went LIVE around in 2016-2017 who were one of the early adopters of AX7


Ok, to get into the details, I used this powershell script within my Sandbox Tier 2 VM. Note, you need to have RDP Access to run this script. This uses Azure Instance Metadata Service described by Microsoft over here - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service


"The Azure Instance Metadata Service (IMDS) provides information about currently running virtual machine instances and can be used to manage and configure your virtual machines. This information includes the SKU, storage, network configurations, and upcoming maintenance events"

Now, into action -  

You can log on to your Sandbox VM using the normal useraccount from LCS and then open PS Window and chuck this in:

Invoke-RestMethod -Headers @{"Metadata"="true"} -URI http://169.254.169.254/metadata/instance/compute?api-version=2020-06-01 -Method get

Output:








As you can see from the above output, you get all your details like Resource Name, SubscriptionId, VMSize all these details for a Microsoft managed VM

Another variant of this script below, is a json formatted string as shown next:

Invoke-RestMethod -Headers @{"Metadata"="true"} -Method GET -Uri http://169.254.169.254/metadata/instance?api-version=2020-06-01 | ConvertTo-Json


Now, coming to the most interesting part, Microsoft recommends to deploy cloud hosted VM using D13V2 but i'm wondering why they are using a lower spec VM Family for a Tier-2 Sandbox UAT Environment which is like a critical environment as you do your UAT testing


If you are interested to know the difference of these VM sizes, you can head off to the Azure Compute Price VM link, i just summarized a table for your reference

Tier

VM Family

Cores

Memory

Max Disks

Max IOPS

Temp Storage(GiB)

Tier 2 - UAT

B8ms – General Purpose

8

32

16

4320

64

Tier 1 – Cloud Hosted Dev VM

D13V2- Memory Optimized

8

56

32

32x500

400

So friends, I'm still intrigued as why B8MS and I triple checked in 3 other client environments where in I have still RDP Access to UAT and all of them show the same results


Maybe Microsoft has multiple Tier 2 VMs for UAT and they are doing some kind of load balancing in the background, but still it's interesting to know when the customer purchases the D365 FO Subscription, it's told we get solid VM specs!


Your thoughts, readers?



Thursday, June 11, 2020

CDS SQL Connection Error AADSTS50076 Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access

Dear Friends,

Just a quick post on this error, I got while trying to connect to our CDS database using SQL Management Studio

Error:

AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access






Fix:

Since MFA authentication was turned ON:

To overcome, this error, I had to login with the authentication method: Azure Active Directory - Universal with MFA



You can read more about the MFA policies here - https://docs.microsoft.com/en-us/azure/azure-sql/database/authentication-mfa-ssms-configure