Posts Tagged ‘Microsoft Dynamics CRM VPC’

“The request failed with HTTP status 401: Unauthorized.”

The story:

I needed to do a few demos on Microsoft Dynamics CRM 4.0 for Outlook (On-Premise deployment).

I have this MSCRM VPC VM running locally on my Windows 7 64 bit RC build host machine. This functions as my CRM Server, and I use everything locally to connect to it to do my demos, like; Browse to CRM Web via IE8 on my host, and connect CRM Outlook client to this local VM CRM Server. The reason we are doing it this way, is to hide the VM from the audience all together, so we can show off some of the Windows 7 eye candy features as well. I installed Microsoft Dynamics CRM 4.0 for Outlook and went about configuring it…

The problem:

In the 3rd dialog of the configuration wizard where it asks me for the Intranet address for my crm deployment.

image

I punched in http://moss:5555/ then click on Next…

(I shared loopback adaptor with my VM and statically assigned IP addresses for both the VM as well as my host on the adaptor, so that they belong the same subnet, I then mapped the IP address to ‘moss’ in the hosts file on my host machine)

This big, fat, ugly error popped out “The request failed with HTTP status 401: Unauthorized.

image

Wait!!! there is MORE… “Mandatory updates for Microsoft Dynamics CRM could not be applied successfully, Try running the application again.

image

Ok it and exit out of the configuration wizard…

 

The Resolution:

So there I was, bing’ing / Google’ing the Interweb in desperate needs for an answer. Thanks to Girish Raja who pointed me to the right directly and here it is:

Microsoft Dynamics CRM 4.0 for Outlook (On-Premise)” doesn’t tell you, doesn’t prompt you, and it secretly, deceitfully uses  ‘Stored Credentials’ on the host machine to connect to the server. If it doesn’t find the login details in the ‘Stored Credentials’ on your Windows OS, it will spit out with the above error messages.

Pretty sneaky I reckon!

So there are a couple of ways you can resolve this,

First approach is to use IE;

1. Hit http://moss:5555/ (Or whatever your crm server address is)

image

2. You’ll be greeted with a Windows Auth prompt, punch your credential and REMEMBER to tick the "Remember my credentials” checkbox, because this will put your credential in the Windows Vault (a new name in Windows 7 for an old feature Saved Credentials).

image

3. To see this in Windows Vault (If you are on Windows 7), Start | User Accounts and Family Safety | Credential Manager

image

alternatively you can directly get to it when in enter “Manage Windows Credentials” or “Windows Vault” and “Stored Credentials” works too…

image

Second approach is to directly add the credential from Credential Manager, which I won’t elaborate, and I’ll reference to an article on how to achieve this later in this post…

Now, when you go back to the MS CRM Outlook Configuration Wizard; we will be able to step through it…

image

That was easy 😉

Note: You will not be required to deal with “Stored Credentials” if you satisfy the following conditions;
a. Your machine is joined to the same domain as MSCRM
b. You’ve logged on as a domain account and your domain account is a CRM User.
d. You’ve added MSCRM URL to your Intranet sites.
e. Your IE settings is set to “Automatic logon only in Intranet zone” in IE 8 | Tools | Internet Options | Security | Local intranet | Custom Level | User Authentication | Logon

 

A side note on Windows Vault in Windows 7:

It seems to me that, Windows Vault is essentially the “Stored Credentials” or “Stored User Names and Passwords” feature in previous Windows OS (client and server) but given a prettier name in Windows 7 and with more features.

My colleague Chaks has written a great article explaining the Windows Vault  feature in details.

Advertisements

Virtual PC Management for MS CRM Consultants

The Blab:

I don’t particularly enjoy being deprived of sleep, and things like attending a live LiveMeeting session running 9:00AM – 10:00AM on Pacific Time (meaning waking up  at 3:00AM on our NZ Time) doesn’t really appeal to me a great deal.

NEVER FEAR, MY FELLOW COMRADES!!!

– Long live LiveMeeting On-Demand!!! 🙂

So, I was watching a MSFT Partner on-demand LiveMeeting training “Launching Your Microsoft Dynamics™ CRM Practice: Tools for Microsoft Dynamics™ CRM Consultants” hosted by Val Draper, a CRM PTS out from the States somewhere.

Ok, getting to my point of this post. There was a few polling questions Val started his session on, one was “Do you use Differencing disks on the Microsoft Dynamics CRM VPC image”. I was in complete AWE when I heard what the response was – “100% of the attendants are NOT using differencing disks” and these are MSFT Gold partners around the globe we are talking about here…

In this post, I write about what differencing disks are, why I use differencing disks and how I use it with Microsoft Dynamics CRM VPC Image.

Issue #1: “I need more disk space for my VPCs!!!”

I’m a MSCRM Specialist and I work with different clients on their MSCRM implementations day in and day out. Just like most(?) other MSCRM Specialists out there, I do ANYTHING and EVERYTHING in the Microsoft Dynamics CRM VPC Image. If it had a 2 bedrooms apartment with a heat pump and a sea view, I’d live in it.

The two OOTB .VHD files come with this VPC image are 15.6 GB in size. Imagine I get pimped out to work on 15+ clients’ implementations over a course of 6 months time (which is insanely realistic). To keep different clients IP (customisations, codes, third party add-ons etc) separate from each other, I’ll need to have 15 copies of the VPC image on my laptop.

So Let me pull up the calculator: 15.6 GB x 15 = 234 GB and let’s assume client specific changes we make are 3GB each 3GB x 15 = 45GB. All up I need 234GB + 45GB = 279GB of disk space just for my VPC storage.

Soon I’ll be crying out loud for more disk space… 

image

Introducing Microsoft Virtual PC Differencing Disks

This is a really simple concept, a differencing disk is simply a VHD file that’s created based on another VHD file. Let’s call this base VHD “Parent VHD” and the differencing disk “Child VHD” for the moment and they work like this,

1. A “Child VHD” can be created with Virtual Disk Wizard in Microsoft Virtual PC using “mouse-point-and-click”, the “Child VHD” keeps a reference to “Parent VHD”.

2. When we create a Virtual Machine using Microsoft VPC, we can directly point the VM to the “Child VHD”. So in the VMC file there is no reference to the “Parent VHD”.

3. When we commit “Saved states” (a.k.a. any changes we made to a VM) to Hard Disk, it is saved to the “Child VHD” instead of “Parent VHD”. We essentially write all the differences we made to the Child VHD, hence the name “differencing disk”.

4. “Parent VHD” file can be and should be permanently marked “Read Only” via file properties at OS level. (explained further down this post)

How is differencing disk helping us with VPC disk spaces?

In our context, the “Parent VHD” is the “CRM-SRV-01 2009.vhd” that comes Microsoft Dynamics CRM VPC Image, and I create a child VHD for each of the 15 clients I have. Since we are not writing our changes to the “Parent VHD”, it remains client independent. Therefore, we can share this parent VHD across all of our clients, and assuming that our client “Child VHD” are 3 GB on average as well. Which means I only need 3GB x 15 + 15.6GB x (15 – 14) = 60.6GB of disk space comparing to 279 GB. This is a total saving of 279GB – 60.6GB = 218.4GB and 78.3% (218.4/ 279) of disk space comparing the the previous approach.

image

“So, how exactly do I create a Differencing Disk for MS CRM VPC Image” – I hear you ask?

Here is a step to step instructions on the HOW-TO…

  1. Download Microsoft Dynamics CRM 4.0 Virtual PC Image (April 2009).
    (*Note: you will need to have MBS Partner access, this image expires on 12/08/2010)image
  2. Double click on “MSCRM 40 2009 Demonstration VPC.part01.exe” to extract its content. When the extraction completes, you will see three files.image 
    “CRM-SRV-01 2009.vmc” – Fist thing to do is to delete this file, because, this is the VM that directly references the “Parent VHD” (CRM-SRV-012009.vhd). This is not what we want. What we want is to create a “Child VHD” (Differencing Disk) that reference this “Parent VHD”, THEN, create a VM (a vmc file) based on the “Child VHD”.

    “CRM-SRV-012009.vhd” – This is our main guy, it contains the Operating System, all software installed etc. This will be the “Parent VHD” for our clients Differencing Disks. You notice that I’ve made this file read only. This is because if I make changes to this file after creating Differencing Disks based on it, the Differencing Disks will become invalid.

    ”CRM-SRV-01 2009 Extrax v1.vhd” – This vhd contains a whole bunch of additional utilities like the accelerators etc. When mounted to a VM, this shows as a separate drive.

  3. Open Microsoft Virtual PC 2007 SP1.

    image
  4. File | Virtual Disk Wizard
    image
  5. Next | Select “Create a new virtual disk” | Next | Select to create “A virtual hard disk” | NextimageHere are a few rationales that I chose the above location for this differencing disk; 
            a. I store all my client project work under %Drive%:\Projects\ 
            b. I name the folder the client’s name – in this case, I have “Client 15” 
            c. I explicitly name the differencing disk “client name” + Diff
             Disk.vhd
    , so that even if it does get out of the folder context I know
               exactly what it is for. I sometime add the “project name” to it too 
               if there are more than one crm project going on with one particular
               client. 
           d. The reason I don’t include the “Parent VHD” name in this diff name is 
               because, when I do get to created a new VM based on this Diff Disk, 
               and it loses its references to the “Parent VHD”, it will show me the
               Parent VHD’s name and ask me to link to it.
  6. Next | select “Differencing” | Nextimage
  7. Browse to the “CRM-SRV-01 2009.vhd” file that we extracted earlier.imageNote: It warms us that we shouldn’t do any changes to this parent vhd. This 
             is why I made it read only in step 2.
  8. Finish | Congratulations!!! You have now successfully created a Differencing Disk based on the Microsoft Dynamics CRM VPC Image.image
  9. Now we will create a Virtual Machine based on this Differencing Disk.
    File | New Virtual Machine Wizard.
    image

10. Next | select “Create a virtual machine” | Nextimage 11. Browse to a location and enter the name for the vm | Nextimage      Note: I personally prefer to store the vmc files alongside referenced vhd file. 
               In this case, it’s %Drive%”:\Projects\Client 15\Client 15.vmc

12. Select Windows Server 2003 for OS as is the Microsoft Dynamics CRM 4.0
      Virtual PC Image (April 2009)
| Next.image

13. Allocate 2GB of memory to the VM | Nextimage

14.  Select “An existing virtual hard disk” | Nextimage
15. Select the vhd file location, check Enable undo disks | Next.image     Note: This is the differencing disk we created earlier, the “Child VHD”. 
              I always check Enable undo disks, I think it should default to checked.

16.  Finish | Woila!!! You have successfully create a Virtual Machine that’s based 
       a differencing disk! and you can go about using the newly created VM.image

Issue #2: “My VM is running too slow, how can I improve its performance?”

One other benefit of using difference disks, apart from saving disk space, is it can greatly improve your VM performance by running the Base (parent) VHD on a separate physical disk (not just separate disk partitions), yet better, run it on a USB stick or a separate Solid State Drive (SSD). Here are the reasons;

1. By creating a differencing disk, we are introducing an additional file for Virtual
    PC Process to perform Disk Operations on. This is on top of the Parent VHD
    and the saved states files. So, having the Parent VHD separate from the
    Differencing Disk and saved states files on a different physical disk, we are
    offloading competing Disk Operations on one single disk.

2. This Parent VHD is read only and we are only doing ONLY Read Disk Operation
    on it, SSDs and USB drives are fantastic in performing read disk operations.
    (and shit in doing writes). So the set up is illustrated in the diagram below;

image

3. Taking this setup one step further, I have these 32GB USB drives, I put two
    different Parents.vhd files on them, create two diff disks and two VMs pointing
    to each of them respectively, give them 1.5 GB of RAM each, leaving 1GB of my
    Windows 7 64 bit host OS. AND run two VMs on one single laptop!!! It works
    like a charm!!!IMG_0245 If you are really up to it and have these 8GB onboard RAM laptops lying around, you can try to run 3 VMs at the same time, give them 2GB each and see how they go 🙂

TO SUM UP:

1. As a CRM Specialist, we have multiple VMs catering for different clients. 
    Differencing Disk is a very space efficient approach to manage these VMs.

2. You can host the base Microsoft Dynamics CRM VPC VHD on a USB drive for 
    your VMs to improve their performance.

3. You can take this concept one step further and run two VMs (perhaps more if 
    you have one of those 8GB RAM laptops) at the same time without taking much 
    toll on the performance.

4. These concepts don’t just apply to CRM  peeps, it really applies to anyone that
    use multiple VMs, check out Andrew Connell, a SharePoint MVP, a virtualization
    maniac, how he has taken SharePoint development VMs to the extreme.

Happy VM’ing everyone!!!