Saturday, June 4, 2011

Running the Dynamics CRM VPC on Windows 7

Microsoft have now released a VPC demo image for Dynamics CRM 2011

https://mbs.microsoft.com/Cms/Templates/document/General.aspx?NRMODE=Published&NRNODEGUID={060C9677-229D-49E1-9F00-95E56D9F1657}&NRORIGINALURL=/partnersource/deployment/methodology/vpc/MSD_CRM2011VirtualMachine&NRCACHEHINT=Guest&wa=wsignin1.0

A nice set of two virtual machines; one running Dynamics CRM and the other running Exchange.

The Problem

The problem is Dynamics CRM 2011 only runs on 64 bit servers. Therefore the VPC image is 64 bit. The only software Microsoft provides to run 64 bit VPC images on is Hyper-V. Hyper-V only runs on Windows Server 2008, which is also 64 bit. Therefore, if we are to embrace all things Microsoft, and want to run the demo on a laptop, we need to install Windows Server 2008 on our laptop.

Unfortunately Windows Server 2008 was not built to be run on laptops. It has no concept of things like hibernation and power management. No one says ‘I am so glad I installed Windows Server 2008 on my laptop’. So what is the solution?

The Solution

While Microsoft provides no software to run 64 bit VPC images on a laptop operating system like Windows 7, Sun Microsystems does. VirtualBox (http://www.virtualbox.org) runs on Windows 7 and plays nicely with Microsoft VPC 64 bit images.

So, the first step is downloading and installing VirtualBox. The latest version, at the time of writing is 4.0.8. Download the installer and hit ‘Next’, ‘Yes’ and ‘Install’ a lot.

image

Now that you have installed VirtualBox we need to run it and add our downloaded VPC image to it. To do this we click the ‘New’ button.

image

The wizard will guide you through adding the VPC image. Set up VirtualBox to run the image as a Windows Server 2008 64 bit

image

Next you will need to assign memory. The guide suggests 4G RAM but I only have 2G RAM to spare.

Please note: In the end I had to set this to over 2000 MB to avoid the guest blue screening due to running out of memory.

image

Next you will want to use an existing disk. Browse to the disk you have extracted from the Microsoft demo download.

image

After this you click ‘Finish’.

image

If you try to start the image at this point you will see the Blue Screen of Death about five seconds into booting. First we must click on ‘Storage’, remove the SATA hard drive and add it back as an IDE drive. It should look like this when you are done.

image

Click OK and start up the machine. Many popup boxes appear but once you wade through them it should kick into operation.

Fixing The Memory

The biggest problem you will have, if you are running the image on a host machine with 4G RAM, is the lack of memory available to the guest. To be honest, if you are going to be performing extended demos with this image you will need a machine with at least 8G RAM. However, if you don’t have this option, here is a quick bit of memory optimization. That cheeky SQL Server is grabbing as much as possible. In fact, on my work machine, SQL was chewing through 600M RAM when I ran this image. To fix the situation we need to run SQL Server Management Studio.

image

Once logged in, we can adjust the memory management of our SQL Server.

image

Going to the Memory area we see that SQL Server can grab up to 640M RAM from the machine. Given our limitations, we can set this to something more palatable, say 500M RAM, giving the guest just that little more to run. The downside of this is SQL Server may be a little slower in responding to database requests or may timeout. However, given the VPC image will not run in our case without a little extra memory, throttling is the lesser of two evils.

Another option to gain a little extra memory is to see how much idle memory the host has (via task manager). Leaving yourself a buffer of, say 200M RAM, if the host is not close to maximum you can boost the memory allocated to the guest.

Hopefully these little tricks will get it working on your machine.

Good luck.

14 comments:

Leon Tribe said...

As a bit of an update, I went to boot my laptop this morning to be greeted by ndis.sys blue screen errors. The culprit seems to be VirtualBox. After a system restore it looks like I'm back in action but you may want to do a backup before installing VirtualBox ;)

michael said...

Leon - if you only have 4GB of memory, I suggest more.. (I know I'm preachin to the choir but thought I'd mention it). By the way, I'm glad I am running Server 08 on my laptop for two years now. Power Management is the only thing I don't have, and I am delighted to leverage Hyper-V. Many of the MS Images are designed to run on Hyper-V and I do so much Microsoft stuff that I recognized the early need to get on board.

Leon Tribe said...

Hi Michael,

My machine is now upgraded to 8G of RAM but I had to demo the Outlook client before the RAM arrived, thus the memory juggling. It worked fine on the work computer but my home laptop, which I used for the blog post, was not happy (thus the blue screen comment). My speculation was the low spec CPU causing a backlog. The image runs fine at work though.

As for Server 08 on a laptop, try hibernating the machine some time ;) We have a demo laptop at work with Server 08 on it 'just in case' but I can't tell you the number of times that thing has run out of juice because someone closed the lid without thinking. The real question though is not so much whether Server 08 should run on a laptop but why Virtual PC won't run 64 bit images.

Given VirtualBox shows it can be done I imagine it won't be long coming and when it does I will probably also switch back to Virtual PC.

nzCRMguy said...

Leon did you have any issues with SharePoint running in the image? For some reason I am getting a 404 error when trying to access the SharePoint site:
http://intranet.contoso.com

Leon Tribe said...

Actually, I had troubles getting SharePoint running as well. I'm not sure if this is a VirtualBox thing or dodgy demo image thing.

Mhammo said...

I'm betting the SharePoint thing is a wonky demo image. I get similar errors. I am thinking it's contention between CRM and SP because both seem to be setup for port 80. Pretty sure this is something that should not be done.

pushnaren said...

My VPC Image keeps restarting within the VirtualBox. The log is so cryptic.. Anybody having a similar issue. I tried to uninstall the latest VirtualBox and loaded the same exact version and still would not work. Is it because I have a Intel based x64 PC? Do I have to install anything other than the VirtualBox itself?

Leon Tribe said...

I installed nothing else when I did it. The only thing I'd check would be that you have set up the hard drive as an IDE, not SCSI

Mhammo said...

Confirmed they have both SharePoint and CRM setup on port 8 which really is big no-no. The easiest way I have found to resolve this is to just create a new SharePoint Site. You can still run SharePoint Central Admin in the image which will allow you to create a new site.

After you create a new SP Site, you can then install the CRM SharePoint List web part and reconfigure CRM to use the new Site.

Knobbe said...

Is this a IFD?

Leon Tribe said...

I'm not sure. I don't think so though.

Mhammo said...

No, it is not IFD.

Have another issue on mine, cannot connect the two images together. E.g. there is a "CRM image" and an "Exchange image" but I have been unable to get the two to work together. I have them setup on an internal network named CRM2011 (also tried sharing via NAT and Bridged). No matter what, the images never "talk" to each other.

I can ping the images, e.g. from CRM2011-01 I can ping CRM2011-02 and get instant replies. The problem is Exchange never "sees" AD in the CRM image and the CRM image never sees Exchange running.

Anyone esle run into this and able to get the two images to work together?

Gustaf Westerlund said...

Great post, good of you to try it out. Amazing it works so well.

SharePoint didn't work correctly when I started it which I fixed by correcting some things in the hostsfile. I have some other comments as well and of course references to you blog and this posting on my blog.
http://gustafwesterlund.blogspot.com/2012/02/running-microsofts-demo-vpc-on-windows.html

Leon Tribe said...

Gustaf,

Just had a quick look at your blog post. It is great you figured out a solution to getting sharepoint working. Microsoft shipping the VPC with it being broken was quite annoying.

Thanks for the link to the fix.