Building a CRM 2011 dev box using a Windows Azure Virtual Machine

UPDATE: The instructions were a bit out of order.  Thanks for @DynamicsCRM_EDU for the heads up!  I fixed it.  Please let me know if you find anything else that needs clarification.  I write these things late in the night most of the timeWinking smile.

I am a big fan of the One Organization per Developer approach to team development with Dynamics CRM 2011.  Additionally, I think every CRM developer should have their own isolated development environment (just like most traditional development environments).  Some of the benefits:

  • Not stepping on other peoples work (or worse someone else hosing my work)
  • No one else’s publishing action slowing me down
  • Can attach debuggers for plugin / workflow activity code
  • Sometimes you need to spin up/tear down CRM orgs for prototyping, fixing things that are hard to undo once you’ve done them, etc.
  • Like most development, you churn a bit until you are ready to check your changes in for others to use

I’ll be blogging more about source control stuff, but have a look at this post for a peek at a tool that’s coming to make source control of non code customizations easier:

http://dkdt.me/LuupSo

Frankly, the problem with building out a CRM dev box is that it requires capable hardware to run CRM and Visual Studio and SharePoint and SQL and Reporting Services and…you get the point.  Sometimes, acquiring capable hardware is not something you have control over Sad smile.  Therefore, people end up using less than adequate developer environments for CRM development.  While CRM Online is great for production and staging environments, it just doesn’t offer the developer productivity that self contained, all tools on one box, isolated CRM environment do.  Windows Azure’s new Infrastructure as a Service (IAAS) Virtual Machines (VMs) to the rescue!  I just wrapped up building my first CRM dev box on Windows Azure.  Here are my notes on getting it working for those who want to try it.

DISCLAIMER: CRM 2011 isn’t support for production deployment in Windows Azure VMs just yet, but works just fine in a single VM developer install.

First, I followed the instructions below up to the Open the virtual machine using Remote Desktop and complete setup section.

http://dkdt.me/NTRiPa

I chose a 4 core, 7 GB RAM VM because that’s what I run for the VM on my Lenovo 510 laptop.  You can probably get away with less, but this config has served me well OnPremises, so I went with it.  Once I was able to establish a Remote Desktop connection, I immediately went into Server Manger and clicked the Configure IE ESC link and turned it off so I could surf the web without warnings:

image

Then, I enabled Microsoft Update:

http://dkdt.me/LuusgN

I went ahead and ran Microsoft Update and installed everything. 

https://www.windowsazure.com/en-us/manage/windows/how-to-guides/attach-a-disk/

The Windows Azure VM we picked has two drives (C: and D:).  The C: drive only has 30 GB.  The D: drive isn’t durable, so don’t put anything on it that you expect to still be there if your VM gets rebooted, moved, etc.  Therefore, you are going to want to add another drive for your databases.  I added a 30 GB drive:

image

image

You will also need to initialize the disk in the VM:

http://dkdt.me/MlAOOH

Make sure you configure SQL Server to use the new drive as the default location for data and log files:

http://dkdt.me/LuupSp

Per this blog post:

http://dkdt.me/LuusgO

…you don’t want write caching on the disk your databases are on.  The good news is that the data disk we just created has write caching off by default.  The pre-configured VM I picked from Windows Azure already has SQL Server 2012 installed, including Reporting Services.  From there, I followed the instructions in Girish’s  blog to setup a CRM 2011 VM:

http://dkdt.me/LuupSr

Of course, you can skip the Windows/SQL Server/Hyper-V stuff since we already have a VM running in Windows Azure with Windows/SQL pre-installed.  You can skip to about the 19:30 point in the video to get started.  At about the 23:00 point, you’ll need to reboot.  The next step in the video is to install SQL Server.  While you don’t need to because it’s already installed in the VM, you do need to configure Reporting Services (accept all defaults, unless I call a change out otherwise):

image

image

In the picture above, make sure you run under a domain account.  Otherwise, the CRM Reporting Extensions will not pass the environment check.

image

image

image

    

Since we don’t need to install SQL Server, you can skip to the 34:15 point.  At about the 38:10 point, you will be told to go ahead and Run the SharePoint Products Configuration Wizard.  DON’T!  Instead, install Service Pack 1 for SharePoint Foundation:

http://dkdt.me/LuusgP

Once you’ve done that, then pick up where the video left off by manually running the SharePoint Products Configuration Wizard:

image

When you get to the point of running the CRM 2011 installer, grab the bits from:

http://dkdt.me/Luuq8E

This update has Update Rollup 6 slipstreamed so it installs perfectly fine on SQL Server 2012.  You can use your MSDN/TechNet keys to register CRM 2011 if you want to use the VM for longer than 90 days.  Otherwise, just use the trial key from the link above.  The last thing I did was run Microsoft Update one more time and accept all the updates (which include Update Rollup 8).  Cleaning up any of the installer files you downloaded isn’t a bad idea either.

At this point, you have a fully functional CRM 2011 dev box which you can remote into and work within in isolation.  Of course, you’ll probably want to have a look at My CRM Dev VM post which talks about what else I like to install into a CRM Dev VM.  If you need source control for this VM, then you should try http://dkdt.me/Luuq8G.  If you really need to gain access to resources from the VM that are behind your corporate firewall (like an existing TFS server), there’s always Windows Azure Virtual Network

Hopefully this helps any of you out there who had the same idea I had!

@devkeydet

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 )

Facebook photo

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

Connecting to %s