Detailed Version Information in LCS

When contacting Microsoft Support about Dynamics 365 for Operations they often ask you for the version information for an environment. We have been having an issue with seeing it for our Cloud Hosted Environments… it simply was not there:

SNAGHTML9e3aa91

I finally found a way to fix this and it is Very Simple (onece you know it)

Go to the adress bar in your browser… At here end of your URL you will find:

&IsDiagnosticsEnabledEnvironment=false

change it to:

&IsDiagnosticsEnabledEnvironment=true

and presto!!!

SNAGHTML9e78d61

/Johan

Error in Environment Reprovisioning tool

I have been working with an upgrade of Dynamics 365 for Operations now for a while and found an issue when it comes to Environment Reprovisioning tool, also known as Retail Retargeting Tool. This is a tool used to fix the retail conponents in an environment after you have done a database copy to the environment from another environment. We did this as part of the upgrade to Platfor Update 10.

When we ran the tool from the command prompt in the environemnt we gor the following error:

The step completed
Executing step: 3
GlobalUpdate script for service model: RetailServer on machine: localhost
Run RetargetRetailServer.ps1
RetargetRetailServer.ps1 failed.
The step failed
The step: 3 is in failed state, you can use rerunstep command to debug the step explicitly
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.executeRunbookStepList(RunbookData runbookData, List`1 runbookStepList, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Boolean restore, Parameters parameters)
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.RunbookExecutor.executeRunbook(RunbookData runbookData, String updatePackageFilePath, Boolean silent, String stepID, ExecuteStepMode executeStepMode, Boolean versionCheck, Boolean restore, Parameters parameters)
at Microsoft.Dynamics.AX.AXUpdateInstallerBase.AXUpdateInstallerBase.execute(String runbookID, Boolean silent, String updatePackageFilePath, IRunbookExecutor runbookExecutor, Boolean versionCheck, Boolean restore)
at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args)
at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args)

So this error was not that obvious to me… So I took a look at the loggs for the Deployable package which are located in the RunbookWorkingFolder (located in the folder where you extracted the package). There I found this:

Exception : System.Management.Automation.RuntimeException: The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin
TargetObject : The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin

This made me think… The older environments always had an account called axlocaladmin but the newer ones does not. After some digging around in the script called RetargetRetailServer.ps1 I found this (on line 302) :

if($env:UserName -ne ‘axlocaladmin’)
{
$errorMessage = “The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin”
Log-TimedMessage $errorMessage
throw $errorMessage
}

I simply changed it to:

if($env:UserName -ne ‘adminXXXXXXXXXX’)
{
$errorMessage = “The servicing data of this box has not been migrated yet, please rerun this tool with axlocaladmin”
Log-TimedMessage $errorMessage
throw $errorMessage
}

where adminXXXXXXXXXX is the account name for my user and the i re-ran:

AXUpdateInstaller.exe execute -runbookid=env-reprovision -rerunstep=3

And presto… it worked 🙂

Note that this is the reprovisioning tool from 8/30/2017, I have not looked at any other verisons.

/Johan

Activating Dynamincs AX 2012 VMs deployed to Azure from LCS

Our company has retired all of our lab hosts which we used to have internally which means thet we need to have our lab servers on Microsoft Azure. To install the servers we use LCS (Lice Cycle Services) which deploys a VM in our Azure Subscription. The problem is that the VM is not activated, which on an internal server would require a product key and a Windows Server License… When running VMs internally we used to handle this by rearming the VMs 3 times which gives us a total of 180 days and then set up a new one which was a little hassle but it worked. But since we now have deployed VMs on Azure there is actually a license included in the Azure VM which means that there is no need to run a server which is not activated. Here is a short description on how to activate the AX VM…

  1. Install the new VM on Microsoft Azure using LCS
  2. Log into the the server using RDP (the logon info is in LCS)
  3. Start an elevated command prompt
  4. Find the edition of the VM by running this command:

    DISM /online /Get-CurrentEdition

    We get: Current Edition : ServerDatacenterEval

  5. Find out which edition you can upgrade to by running:

    DISM /online /Get-TargetEditions

    We get: Target Edition : ServerDatacenter

    This means that you can upgrade from the evaluation edition of datacenter edition to the full version of datacenter edition. Now we need a license key… Microsoft uses Automatic Virtual Machine Activation to license the VMs in Azure… This means that if the host is activated (which it hopefully is Smile ) the guest gets activated but to use this feature the guest VM still need a product key. The keys are available on Technet.

  6. Use the correct key to activate the VM by running this:

    DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEULA

  7. Restart the VM and verify that is is not using Evaluation Edition anymore

    image

That’s all for today

Links:

https://technet.microsoft.com/en-us/library/dn303421.aspx

Issues with LCS System Diagnostics

I am working with a customer today and we are setting up LCS System Diagnostics on their AX 2012 R3 environment. They have quite a locked down environment which presents some challenges.

First of all we need to open outgoing traffic to LCS and to Azure from the server where we installed LCS according to Microsoft. The adresses are:

Azure: 168.62.1.142:443
LCS: 137.135.11.111:443

If you miss the Azure port no data vill be uploades since the upload is a Zipped file to an Azure Storage account

Johan