Dynamics CRM 2011 on Windows Server 2012

6 comments

Posted on 1st May 2013 by Jukka Niiranen in Configuration |Tips

, , , , ,

In addition to the shared development and test CRM servers at the office, I like to run my own personal CRM sandbox that allows me to test any applications, configurations and updates without having to worry about affecting any of my colleagues’ work. I’ve been running a VirtualBox server image on my desktop PC and standard hard drives, but even in a single user test environment, you can never have too much performance for your own needs.

SanDisk_ExtremeAfter reading this blog post from Jeff Atwood, I couldn’t help but to shop around for an “SSD in your pocket”, meaning a super fast USB flash drive that would have sufficient storage space for hosting a CRM 2011 development server image. I decided to grab the SanDisk SDCZ80-064G-X46 64GB Extreme USB 3.0 Flash Drive from Amazon.co.uk for €60 and test it out as a portable CRM sandbox. 190 MB/s read and 170 MB/s write should provide a nice performance boost compared to my old spinning HDD’s.

Since shrinking my existing VirtualBox image down to the 60Gb available on the flash drive would have meant giving up on a lot of things I had installed there, I decided this was a good moment for building a brand new virtual server. During the fall I had already attempted a few times to deploy CRM 2011 on Windows Server 2012, even though it has been unsupported. Unfortunately none of the workarounds published by Daniel Cai had done the trick for me, so I decided to wait for the official support.

With Update Rollup 13 Microsoft Dynamics CRM 2011 Server finally became officially supported to be run on Windows Server 2012. However, there was one catch: you could only upgrade an existing Windows Server 2008 deployment with CRM 2011 onto Windows Server 2012. For a brand new deployment there was a disclaimer included with UR13 release notes:

The Self-Healing Setup (SHS) that is required to install Update Rollup 13 for Microsoft Dynamics CRM 2011 on Windows Server 2012 will be published on Microsoft Update alongside the update rollup in mid-to-late April, 2013.

Ok, it’s 1st of May now, so where are these SHS files? Well, they are available, but not quite in the kind of format you would expect. You can’t simply download an updated version of the Dynamics CRM Server installer, as the one available on Microsoft Download is still the old version with Update Rollup 6 that was released in January 2012.

There’s a thread over at Dynamics Community CRM Forum that discusses the Windows Server 2012 installation procedure, but I’ll summarize how I managed to get CRM installed on such an environment. There were a few puzzling gotchas that no one else should spend their time on pondering.

Get the update files

The KB article 2434455, “How to obtain the setup updates for Microsoft Dynamics CRM 2011″, gives you the steps you need to follow. Instead of heading to Microsoft Download, you’ll need to visit the Microsoft Update catalog website (which only supports IE, by the way, so don’t click the link on Chrome or anything). From there you’ll be able to obtain a file called Setup Update for Microsoft Dynamics CRM Server 2011. The fun part about this is that the size of the file is 1.5 GB.

Setup_update_for_CRM_2011_server

Why is the file so huge, with the actual CRM 2011 Server installer being only 120 MB? The reason is that this file contains all 25 language versions for the update file. If you’re installing the English version, you’ll only need the en-server_kb2434455_amd64_1033 cab file. Oh well, the Internet is fast nowadays and hard drives are infinite, so let’s get on with it.

Prepare for installation

The cab file won’t be the installer itself, rather it’s a collection of updates that needs to be references while running the actual server installer. How do you do that then? By creating a config.xml file following the example given in the KB article above and dropping it into the same folder as installer and the cab file.

Then we can proceed with starting the installation. Only there’s one more catch which isn’t included in the KB article: you’ll need to start the installation process from the command line in order to be able to tell that there’s a config file pointing to a cab file that contains the updates necessary for CRM 2011 to run on Windows Server 2012. You can read through the TechNet article “Use the Command Prompt to Install Microsoft Dynamics CRM 2011″ if you’re interested in the finer details of parameterizing your CRM server deployments, but if you’re like me, you’ll just want to copy-paste the required bits onto the prompt to move on with the process.

  1. Put the cab and config.xml in C:\Temp
  2. Download the UR6 version of CRM 2011 Server installer and put the CRM2011-Server-ENU-amd64.exe file in the same folder
  3. Run the file, point it to extract the files onto the very same C:\Temp directory
  4. Cancel any further setup screens that may be launched, as you’ll still need to provide the pointer to the cab file
  5. Open the command prompt, go to C:\Temp directory and type: setupserver.exe /config C:\Temp\config.xml

This process will make the installer skip the question of “do you want to download updates from Microsoft Update” and use the SHS cab file directly. This is the whole point of our exercise, as Microsoft Update for one reason or another cannot provide the necessary updates for Windows Server 2012 compatibility for the CRM 2011 Server installer.

After this part, you can follow the standard steps for installing CRM. You may get an error screen saying “Action Microsoft.Crm.Setup.Common.InstallWindowsSearchAction failed. Class not registered (Exception from HRESULT: 0×80040154 (REGDB_E_CLASSNOTREG))”, but just click Ignore on it as that issue is most likely just about the indexing service for the CRM help files.

Validate and update once more

Once you’re done and have rebooted the server, you’ll be able to launch CRM. From those oldskool icons in the Wunderbar area you’ll quickly notice that this deployment is still running a pre-cross-browser era version of Dynamics CRM. The build numbers 5.0.9690.2015 and 5.0.9690.1992 indicate that it is in fact a UR6 organization still. (Hmm, was there ever any need for UR13 to support installation on Windows Server 2012 then?) Before you start working on your environment, download and install Update Rollup 13 to make CRM support the IE10 running on your Windows Server 2012, unless you enjoy using the IE7 Compatibility View.

Windows_Server_2012_CRM_2011_small

There we have it. A nice and fast CRM 2011 sandbox image running Windows Server 2012 and SQL Server 2012 in a 36 GB image stored on a very fast thumb drive. I’m sure I’ll be struggling with keeping the image small enough with all the updates, service packs, Office, Visual Studio and other bloat that’s bound to end up there. On the plus side I’ll be able to carry the sandbox on my keychain and plug it into any PC with sufficient memory to run the environment (3.5 GB & 2 CPU reserved for it currently) and enjoy SSD level disk I/O performance. We’ll see if it was worth all the trouble at the end, but hey – don’t we all just enjoy fiddling with the latest software and fastest hardware?

Edit 2013-05-04: For anyone looking to move completely towards developing for Dynamics CRM on top of Windows Server 2012, please note that the Dynamics CRM Outlook client does not support Windows Server 2012 yet. If you try to run the setup, all you will get is the following message: “Cannot install Microsoft Dynamics CRM for Outlook. Install Windows Server 2008 Service Pack 2, and then try again.”

Edit 2013-05-04, Part 2: If you’re interested in the detailed steps for building a Dynamics CRM sandbox, please refer to articles like Creating a MS CRM 2011 VM by Mark Kovalcson or Setting up a CRM demo environment in Windows Azure Virtual Machines by Shan McArthur (unfortunately the images on this post no longer work). It doesn’t really matter on which virtualization platform you’re building your sandbox on. I’m using VirtualBox simply because I have other existing virtual machines on it, but with Windows 8 built-in Hyper-V support you don’t necessarily need any additional software. Also, as you can see from Shan’s post, running these environments in Azure is also a perfectly viable option.

Creating a copy of your production CRM database

3 comments

Posted on 7th August 2012 by Jukka Niiranen in Configuration |Tips

, , , ,

If you have an on-premises CRM server and you’re running Dynamics CRM 2011, then you’re eligible to having more than one database in your CRM environment. Back when the multi-tenancy concept was introduced in CRM 4.0, there was a distinction between Workgroup, Professional and Enterprise editions. Only the Enterprise version granted you the right to run several CRM databases on a single server. With CRM 2011 the Professional and Enterprise editions were merged, which means that almost all Dynamics CRM customers can now enjoy the benefits of multi-tenancy. (The Workgroup edition still has a limitation of max 5 users, which in this age of cloud computing means hardly anyone would choose that version and put up a server for it, so let’s ignore that one.)

Why would you need more than one CRM database? One possible reason could be the XRM approach: for no additional license or hardware costs you could be using your Dynamics CRM environment for also managing other processes than sales, marketing and service that traditionally are the focus area of CRM systems, while keeping it separate from your main customer database (HR, IT service desk, project management etc.). In case you’re happy with focusing on customer relationship management for now, then a typical reason for needing another database is that you want to test some customizations in an environment that won’t mess with your live system settings.

How would you go about managing multiple databases then? In Dynamics CRM terminology, each database represents a distinct organization in CRM. Adding new organizations into your CRM server can be easily achieved through the CRM Deployment Manager. If all you need is a blank new test organization, then just start the New Organization wizard and click through the process, which will create a new database, configure language and currency settings etc. Click Finish and you’re all set!

Oh, you wanted your production system entities, fields and other customizations in there, too? No problem, just go into your production CRM settings area, pick a solution that contains the elements you need and export it. If you don’t have such a solution, then simply create a new one, as it’s not going to affect how your live environment operates in any way. After all, solutions are just pointers to the components like entities, processes or plugins, until you export them, at which time they become physical containers to all those bits that make your CRM environment different from the plain vanilla Dynamics CRM organization. Don’t export your transport solution as managed, unless you have a good reason for it (you’ll know once you do). Just take the unmanaged solution zip file from your current CRM organization, open the new one, import it there and publish all customizations. Now we’re done!

Huh? What’s that you say about data? Would you prefer to have not just the schema of the database but also the contents of your CRM database in that new test organization of yours? In that case, let’s forget the previous steps and use another approach, shall we? Instead of the New Organization wizard you’ll want to use the Import Organization option. Before you click on it, though, we’re going to need to create a copy of your database, because the CRM Deployment Manager does not have a “Copy Organization” feature.

Typically the Import Organization functionality is used when taking a database from some other environment, like when establishing a whole separate development box or test server. Also the actual upgrade process for turning a CRM 4.0 database into a CRM 2011 database is handled through the same import wizard. When you’re in the process of planning your Dynamics CRM upgrade, this is a handy way to update the old CRM 4.0 customizations into new CRM 2011 solutions. In these scenarios you’d first take a backup of the original database on your old SQL Server, then copy it over to the new environment, import it into SQL and finally into CRM. However, as we’re simply creating a replica of the database inside the same environment, we don’t need to necessarily go through the backup stage.

On your SQL Server machine, open up SQL Server Management Studio, right click on the database which has the name ending with “_MSCRM”, then select Tasks – Copy Database. This helpful Copy Database Wizard will step you through the process of creating an exact copy of your CRM organization database. Just give it a different name than the original database and point it to the same server. You don’t even necessarily need to schedule a maintenance break for your production CRM environment, since the wizard can create the copy without the need to detach and attach the original database. This wizard actually builds an SSIS (SQL Server Integration Services) package that takes care of the copy operation.

Before returning to the CRM Deployment Manager we’ll need to pause for a while and think about how the Dynamics CRM server operates. Just like records in CRM, also the actual organization itself has a unique ID in addition to the name and display name visible in Deployment Manager. Although the Import Organization wizard does attempt to handle this, it doesn’t perform it in the most graceful way. The two known side effects from from having overlapping organization ID’s prior to the import are that: A) the import will fail if you’ve customized the business unit entity and B) email router will not work for the new organizations. There might even be other nasty surprises hiding deep inside the database, so ultimately we’d like to have a situation where the organization ID’s are 100% unique.

There are no official tools for this operation, but luckily the Microsoft Dynamics community has come up with a solution. In the CRM Forum thread “CRM 2011 Import Organization on the same server (or how do you create a development sandboxes)” you can find a script that you can execute on your new database copy. This script will generate a new ID and update it to all the relevant tables, including the PrincipalObjectAccess table where the OrganizationID goes by the name PrincipalID. If you’re not familiar with working on SQL Server then it may look scary, but the process itself is quite simple. Select your new database (not the old one!), right click, New Query. Copy the script created by Frenkie Smart found in the CRM Forum post and paste it into the query window. Pause for a minute amd check that you have fresh backup copies of anything that’s valuable to you on that SQL Server. Got it? Good, then just click the Execute button to run the script. You’ll see in the message window below the query how many records the script has changed in each table it processes.

 

Now we’ve got the new database in such a condition that we can proceed to the Import Organization wizard in the CRM Deployment Manager. Select the new database as the one you want to import, give the organization a unique display name and database name, accept the user mappings, and off you go (see detailed process instructions in this Technet article). The Deployment Manager will build a new organization for you from the copy of the existing database, which you can then access by replacing the organization name in your existing CRM URL (in my case from http://server/demo1 to http://server/demo2). If you want to use friendly URL’s or IFD for accessing CRM then you’ll need to know which DNS entries and settings to modify for the new organization to be available.

That’s it, for real. Here’s a quick recap of the process steps:

  1. Copy your production database
  2. Take backups!
  3. Run the script on the new database
  4. Import the database as a new CRM Organization with a unique name

The typical scenario for performing this process would be the need to generate several development organizations that contain identical data and customizations as a starting point. If you just want to maintain your own test organization alongside your production CRM environment then there’s a few things you should take into consideration. First of all, the chance for human error. If you have two identical CRM organizations that are separated only by a few characters in the URL, the chances of mixing them up can be high. Second, you won’t be able to test anything related to Update Rollups and other components that are shared by all the organizations on the server. Third, if you’re unsure about what you’re doing, then don’t do it on your live CRM server!

With all this in mind, it might be a good idea to investigate the possibility of having a separate test server after all, don’t you think? If you don’t have any suitable hardware lying around, then signing up for a virtual machine straight from the cloud is a valid option these days. With its latest improvements, Windows Azure offers a convenient service for provisioning persistent virtual machines as needed. Building a VHD image with CRM 2011 is not a very difficult process if you follow the instructions (and know the few gotchas about SQL or VM size settings). Also, if you don’t need to keep the server up & running on a continuous basis, you can always delete the Azure virtual machine and still keep a copy of the VHD image, available for booting it back up again when the time comes.

Cross-browser support implications for CRM developers and users

6 comments

Posted on 2nd May 2012 by Jukka Niiranen in News and events

, , , , , , , , , , ,

Soon the R8 update of Microsoft Dynamics CRM will be upon us and the application will officially open up to browsers other than Internet Explorer. What this means is CRM will also be accessible through different devices than just Windows PC’s: Macs, Linux machines, iPads and other tablets. Exciting times for all CRM geeks around the world, myself included, which is why I already wrote some of my thoughts on the topic after the Q2 2012 Service Update contents was revealed (see the post “To the eXtreme, part 2: The future of the web caught up with IE and Dynamics CRM”).

More supported browsers & devices will inevitably mean more work for CRM developers, as testing your application on IE alone will no longer be enough. As we get closer to R8 go-live before the end of Q2, the need for more detailed information on the practical implications is surely growing. Luckily XRM Virtual had managed to get Karun Krishna from Microsoft to give a webinar on the topic of cross-browser development on May 1st. The Live Meeting recording is now available for viewing at the XRM Virtual site. Apparently also Karun’s slides were shared during the live session, but since the recording didn’t contain them, I decided to write down a few notes of mine from the contents of the presentation.

First up is the detailed browser support matrix seen below, which expands the list previously provided in the R8 release preview guide. Included are new yellow boxes for Internet Explorer 10 on Windows 7 and Windows 8, which indicate a “supported but not full fidelity” user experience for Dynamics CRM. Also the Firefox support on Mac OS X appears to have fallen onto this level where some display/functionality bugs will exist.

Microsoft Dynamics CRM 2011 cross-browser support matrix

In his presentation, Karun explained that while the CRM team tried to use HTML5 compliant techniques wherever possible, there were still some areas where an alternative approach had to be used in order to replicate the existing Dynamics CRM functionality across non-IE browsers. Any IE specific APIs have been removed, but as the w3C standards are still evolving, there isn’t necessarily always one single right way to implement a specific functionality in the cross-browser world. Therefore a feature detection approach for checking for browser capability differences is recommended over developing for any specific browser version. The webinar included examples and best practices on API’s and XML processing, so be sure to view the recording for details.

It was announced already earlier that using browsers other than Internet Explorer for the administration and customization menus of Dynamics CRM would not be supported. Sorry guys, you’ll still need to boot into Windows on your MacBook if you intend to do any customization work. Some additional information was now provided on features that will not be supported on other browsers than IE. These include:

  • Workplace calendar
  • Services (scheduling) and service calendar
  • Editors for workflows and dialogs
  • Lync based presence information

One thing to note is that the old crmForm object API from CRM 4.0 days will continue to work only for Internet Explorer. Therefore if you have any scripts in place that have not been updated to use the Xrm.Page methods, these won’t work for users on Chrome, Safari or Firefox.

Finally, while iPad 2 support with iOS 5 is provided, it’s important to note that this is simply the support for usage through Safari browser, not a dedicated application optimized for the tablet environment. For the premium UX you’ll need to acquire/subscribe to an add-on app like the Microsoft Dynamics CRM Mobile for iPad, of which you can view screenshots in this post. The browser experience on an iPad 2 will have the following known limitations/issues:

  • No popus. Since Dynamics CRM by default opens a wealth of windows and dialogs, this doesn’t match well with the “flat” UI’s of tablet apps.
  • Touch events compared to mouse events will cause some lack of functionality (no right click, double click)
  • iFrame scroll bars may be missing.
  • Window closing has issues due to a focus related bug in the .close API
  • No Silverlight. Well, no surprise there…

Edit 9.5.2012: The long awaited R8 release for Microsoft Dynamics CRM 2011 is now available as a beta version! PartnerSource login is required for the beta program sign-up and download (CustomerSource might also work) at http://bit.ly/crmr8beta. If you want to test your Dynamics CRM solutions in a cross-browser environment (Safari, Chrome, Firefox) before the official release of Update Rollup 9, then this is the program for you. Please note that the beta version of R8 will not support an upgrade to the final version of R8, so you should apply it to a dedicated test environment only.

Switch to our mobile site