Tuesday, August 21, 2012

Building a CRM 2011 Virtual Machine on Windows 7 using VirtualBox


For folks like me who keep messing around with crm 2011 and its features, it makes a lot of sense to have a dedicated sandbox environment. My goal was to create a virtual machine on my Win 7 laptop, with the following requirements:
1. Able to guest host a x64 OS (Windows 2008)
2. Ability to take snapshots of my VM
3. And of course, ease of use and compatability.

After some research, I landed on using VirtualBox for my needs. There is a great post on the msdn site about creating a vm with Windows Server 2008 and Hyper V. Since I am doing it on Windows 7 and VirtualBox, I will document the steps up to a similar stage in the online video, and after that please use the demo for further instructions. There is no need to duplicate effort, and a demo is always better than text! :)

Software:

I am creating a machine which contains all the software I need, and even though this is not the recommended design, it is fine for my development sandbox. Here is the list of software I used to get setup:
  • VirtualBox for the VM
  • Windows server 2008 Enterprise edition
  • SQL server 2012 Enterprise
  • CRM 2011 Server
  • Visual Studio 2010
Note: Make sure the BIOS setting on your PC for Virtualization is checked, before you install VirtualBox.

Creating the VM:

Update (8/29/2012):
After having working with the vm for a week now, there are a few things I changed to get around some issues. Please make these changes when going through the steps to create the vm.

  • Create the hard drive as IDE controller instead of SATA (SATA caused some weird vm hang issues) 
  • Create the hard drive of type .vdi as that is the native type, and commands like resize work correctly only on the native type(you can convert it into another format later)
  • Create the hard drive with 50 GB space (I was running out of place installing Rollup 10)
  • Set the network adapter as a bridged adapter (this way you get your very own ip for the vm, and can reach crm from your host)

Lets walk through the steps to create your very own sandbox!

1. Download and install VirtualBox  using the screen cues.
2. In Virtual Box Manager, click on New button to create a new virtual machine.
3. In VM Name and OS Type, provide a name and select OS version as Windows 2008 (64 bit).






















4. For memory, I gave about 2 gb. Select the defaults in the virtual hard disk dialog window.
5. I selected VHD as my file type and set the disk storage to be dynamically allocated
6. Select the default value for the virtual disk file location and size (25 gb). Create your hard drive and then the VM.

Note: The minimum RAM is 2 GB based on MS CRM 2011 planning guide, but that is from a 320 user load. If you have the RAM, please allocate even more if possible. But keep in mind not to set too high a RAM as the system resources will not be available to the host when the guest system is running.

When the VM gets started for the first time, the "First Start Wizard" will pop up to help select an installation medium. You can either choose to install the OS from a physical CD/ DVD media, or mount the ISO image file directly on to the VM.

When you first start the VM, the iso file for the Windows Server 2008 will be loaded from the DVD drive of the guest, and you will see the following setup screen. This matches with what you will see 12:50 into the video, after which you can follow along the steps there.






























Issues and Workarounds:

  1. During CRM 2011 installation, I saw this error in the logs during system check "Installation of Microsoft Visual C++ Runtime failed. Exit code: 5100. Result: Asia". Uninstalling Microsoft Visual C++ 2010 v10.0.40219 solved this issue. Please see this forum post for more details.
  2. If using sql server named instance, in specify deployment options, enter <server name>\<sql instance>





























    3.  If using sql server named instance, for report server url, go to Programs/ Microsoft DQL Server for       reporting services, go to Programs/ Microsoft DQL Server 2012/ Configuration tools/ Reporting services Configuration Manager. Once opened, go to Web Service Url tab to report server web service url. Use this value for the report server url during crm2011 installation


No comments:

Post a Comment