Using Azure DevTest Labs for Dynamics 365 Development

When developing plug-ins for Dynamics 365/CRM, working with an on-premise system provides for better tracing and debugging than developing against an online instance.  Also when there is a large team working on common project it makes life much easier when the developers are working on isolated environments.

Onpremise to Online Migration (sidebar)

When working on a on-premise to online migration project, part of the process which I follow (and is part of on ongoing blog series) is creating “step” environments for each version of Dynamics CRM/365 that I need to upgrade to.  DevTest labs is a great tool for this process which I will elaborate on a future post.

Dynamics 365/CRM Virtual Machines for Development

For the last few years my team has been using VMWare to run a standalone Dynamics CRM server images.  I would create a “base” image of a particular version of Dynamics CRM and clone the images and distribute to our developers.  We used VMWare in lieu of Hyper-V as our IT supplied laptops ran Windows 7, which doesn’t run Hyper-V.

We have since been upgraded to Windows 10 however we still need fairly souped up laptops to run a Dynamics 365 server smoothly.  Our team works remotely so we also needed to distribute the VM images via cloud sharing or even snail mailing USB drives.  This caused delays and would eat up monthly download allowances.

On a recent project we needed to bring on some contractors.  Around this time I began to explore Azure DevTest Labs and found it was great way to develop for Dynamics 365.

I could easily do the following:

  • Create a base Dynamics 365 server for isolated development
  • Easily clone the base server for each new developer working on a project
  • Provide a Remote Desktop link to team members so they could work on the project from much lower powered hardware.
  • Put the Virtual Machines on a schedule for start up and shut down to preserve Azure credits and/or keep costs low.

To get started you will need to following:

  • An Azure Subscription
  • Licenses for Dynamics CRM server.
  • Visual Studio (for plug-in development)

For short term projects you could use trial editions, for longer term I would highly recommend getting an MSDN subscription that would provide you with the development software you need and provide an allocation of Azure credits.

Setting up Azure DevTest Labs

First, login to your Azure Management Portal and click on “Create a resource”.  Search the gallery for “DevTest Labs” and click Create.

1
DevTest Labs

Provide the Lab a descriptive name (D365 Development or D365 Migration) depending on your use case.

For location, I ended up using East US2 and the various virtual machine templates that I wanted to use were not available in the region I preferred to use (Canada Central).  You may need to experiment a bit with this.

At this point you can set the auto-shut down schedule.  A cool feature of DevTest labs is that you can set it up to alert you when images are being shut down and allow you to extend the time if you need to finish something off.

2
Setting up Azure DevTest Lab features and schedule

Click create and the process will start.

3

After a few minutes the DevTest Labs environment will be created.

4

Creating a Dynamics 365/CRM Development or Migration Virtual Machine

Once your DevTest labs is created, you can create a Virtual Machine where you can install and configure a Dynamics 365/CRM server.

A couple things of note:

This is not meant for production, so we don’t need to scale to production “specs” or configure the system like we would a production setup.   Since this is meant for development or for a migration, we also can get away with breaking a few rules around what is “supported”.   For example, our development server can have Active Directory, SQL Server and CRM installed on the same box.  We would not do this for production but this is fine for CRM development or a migration.

prodvsdev
Production System vs Development System
5
Add a new VM

A great thing about DevTest labs is you can choose from a set of pre-configured servers.

6
Pre-configure VM images

Depending on what version of Dynamics CRM/365 you need to install, you can pick a particular pre-configured Windows server based on the following table:

Unfortunately at time of this writing, Dynamics 365 v9 on-premise has not yet been released.

Dynamics CRM Version Base System
CRM 2011 SQL Server 2008 R2 SP3 Standard on Windows Server 2008 R2

SQL Server 2012 SP4 Standard on Windows Server 2012 R2

CRM 2013 SQL Server 2008 R2 SP3 Standard on Windows Server 2008 R2

SQL Server 2012 SP4 Standard on Windows Server 2012 R2

SQL Server 2014 SP2 Standard on Windows Server 2012 R2

CRM 2015 SQL Server 2012 SP4 Standard on Windows Server 2012 R2

SQL Server 2014 SP2 Standard on Windows Server 2012 R2

CRM 2016 / Dynamics 365 SQL Server 2012 SP4 Standard on Windows Server 2012 R2

SQL Server 2014 SP2 Standard on Windows Server 2012 R2

I find picking the SQL Server 2012 SP4 Standard on Windows Server 2012 R2 is a good image as it spans most of the recent versions of Dynamics CRM/365.

Once you choose your base system, you can choose a size.  You need to remember that this will be likely used by a single user not as a production system so you don’t need to scale the servers to “full production” size.  I have been choosing DS11_V2 standard but you can pick what works best for you.

7
Sizing your VM

Click create to setup the VM.

8
VM being provisioned

After a few moments, the server will be ready and you can connect to it via RDP.

9
Connect to the VM using RDP

At this point you can configure the server further.  A good step by step instructions to setup a Dynamics CRM development image can be found here.  The only difference is that our DevTest labs VM will have SQL Server pre-installed.

Once you have configured your image (or at least setup the “base” for various CRM images) you can use the VM as template for additional base images.  Click on “Create Custom Image” to make a copy of the VM.

10
Create a Custom Image from this Image

Give the image a descriptive name.  I don’t bother with sysprep as these images will not be networked together.

11
Creating a Custom D365 Development or Migration image

Once the image is created, when you provision new VMs, the image you created will be available for use.

12
Image available

Using DevTest labs for D365/CRM  virtual machines is a quick and easy way to help with your development and migration projects.  Definitely the cost is much lower then outfitting your entire team with high end laptops or workstations.

You could also use the DevTest Labs to keep a “legacy” copy of your old Dynamics CRM system once you migrate it to online.  This is handle if you did not migrate all the data or functionality.  Having access to the “old” CRM system may save you some grief.

Hope you found this blog post informative and helpful.

handsome

Nick Doelman is a Microsoft Business Solutions MVP.  Not only did Nick recently compete at the Canadian National Powerlifting championships, but lost his voice announcing and commentating.  Hopefully his voice will return for the MVP Summit next week.

 

 

 

 

3 thoughts on “Using Azure DevTest Labs for Dynamics 365 Development

  1. Great post! Haven’t used DevTest Labs yet but have heard great things about it. Is there anything to consider regarding setting up Active Directory since D365 has that dependency? I see you ran through the D365 VM setup so not sure if you also set up a VNET or what AD you connected the instance to.

    Like

    1. I just setup AD on the same VM. This would be unsupported for an actual production environment but since this is just meant for development /testing than having AD, SQL and D365 all on the same box is OK, or at least that is how I do it. Hope that helps! Cheers, Nick

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s