There are two main ways to deploy D365FO for development and testing purposes, the more streamlined way is to deploy a preconfigured environment via LCS. While this is extremely straightforward it does incur Azure costs as the resources (virtual machine, networking, storage, etc) are deployed within your Azure instance. The other option is to deploy these resources locally via a virtual hard drive (VHD). This process can help you save overall cost but is also not as straight forward. Let’s look at the steps to do this.

Download the VHD

The first thing to do is to download the VHD from Lifecycle Services (LCS) and navigating to the ‘Shared Asset Library’:

Then navigate to ‘Downloadable VHD’:

Next find the latest VHD version available and download all files related to it, the download will be broken into ‘parts’ be sure to download all parts:

Once downloaded put all files into one folder, you should see one file is of type .exe and the rest are of type .rar. This is because the download is compressed, we need to uncompress it by executing the .exe file which will create the VHD for us:

When you run the .exe file, you will be guided through the extract process and asked for a folder where you would like the VHD to be placed.

After the extraction is complete a VHD file will be created, please note here that these files are MASSIVE (in the screenshot below you can see it is over 133 GB) so be sure wherever you extract this file to has plenty of room. Also for performance reasons, I always recommend these to be stored on a SSD.

The next step is to set up your VHD in a virtualization setup, for my example I am going to use the Hyper-V Manager built into my version of Windows but you can also use others. For some instances of Windows you may need to ‘enable’ the Hyper-V Manager. Within Hyper-V Manager, right click on your computer name and go to New -> Virtual Machine.

Next specify a computer name and ensure where you want to store the virtual machine data.

For the virtual machine generation, I have found that these VHDs only work with Generation 1. If you try to select Generation 2 you will not be able to actually deploy the machine.

On the Assign Memory step, you can set up the amount of RAM you want to allocate to the virtual machine. If feasible with your setup, I would recommend 16 GB or above for performance.

If you want your D365FO environment to be able to connect to the public Internet be sure to set the Connection to ‘Default Switch’ on the Configure Networking step.

It is important that you select the ‘Use an existing Virtual Hard Disk’ option when on the Connect Virtual Hard Disk step. Then point to the path to the VHD you created in the earlier step.

Once you select ‘Finish’ you will see your machine is successfully created.

You can then right click on the machine and select ‘Start’

Once the machine is running you can right click again on it and select ‘Connect’ (also note that this is where you can also control the machine eg: shutdown, machine settings, create a checkpoint).

Once you connect and the machine starts, you will be presented with an initial login screen. An account named ‘localadmin’ is automatically created on the machine and has administrative privileges. The password for this account is: pass@word1

Once you successfully log into the machine, there are some steps that need to be done prior to your D365FO instance actually working.

The first is that you have to tie the VHD you just created to an Azure AD instance via an App Registration (this will allow for D365FO to authenticate users within this tenant to the instance). This can either be through a work instance or a personal instance (I am going to use the instance tied to my @outlook.com account). Navigate to https://portal.azure.com and then select Active Directory, then select App Registrations.

Give your app registration a name and select the ‘Accounts in this organization directory only) radio button, in the Redirect URI add an entry of ‘https://usnconeboxax1aos.cloud.onebox.dynamics.com/’ then click Register.

Once the app registration is created, navigate to the Authentication blade and add an additional redirect URI of ‘https://usnconeboxax1aos.cloud.onebox.dynamics.com/oauth/’ and then click Save.

Once both redirect URIs are added navigate to the Overview page and make a note of the Application (client) ID field, we will need this GUID in the next step.

Now back on your D365FO environment, on your desktop you should see a ‘Generate Self-Signed Certificates’ PowerShell shortcut, double click it:

It will ask for your Application Id, copy the value from the Azure AD app registration you just created and then hit Enter:

Once the PowerShell script has executed you will get a verification that the certificates have been successfully generated:

Next we need to provision our initial admin user within the environment, double click the AdminUserProvisioning tool:

You will need to supply an email address of the user who will be the initial admin of the D365FO instance, please note that this must be an AAD user in the same Azure tenant as the app registration created earlier:

Now that the setup is done, we can launch our D365FO environment. Microsoft uses the Internet Information Services (IIS) Manager to administer the website. If you open this utility and navigate to the AOSService in the left hand pane, you can then find the default URL of the D365FO instance and launch it by clicking on it (or you can use this https://usnconeboxax1aos.cloud.onebox.dynamics.com/).

And you can see that you can successfully navigate to your D365FO instance.

Post Setup Steps

1) Bookmark the default D365FO URL

2) Create a separate ‘admin’ user on the VHD so you don’t have to log in as ‘localadmin’

3) Be sure that RDP is enabled (allows for you to connect from any machine on your network not just the host machine).

4) Install other apps (Google Chrome/Mozilla Firefox, Notepad++, Classic Start etc). I recommend using Ninite to help speed up the process

5) Don’t forget about Windows server licensing, the license attached to the VHD deployment is only good for a small amount of time. If the license expires you will notice that your virtual machine will start to turn off randomly.

There are two options to address this:

Feedback: What steps do you do after deploying a new D365FO instance?

References

Set up the downloadable VHD for first use