Sunday, September 26, 2010

Connecting to MS CRM 2011 outside the VM

While the CRM 2011 VM created so far works well by itself, you will most likely want to access MS CRM web site, web services and endpoints from outside the VM for development purposes.

To do this you will need to set up VirtualBox to allow access from your host computer.

1. With your VM shutdown, modify the Network Settings and enable the second Adapter. As shown below:

  • Attached to: Host-Only Adapter
  • Name: VirtualBox Host-Only Ethernet  Adapter


Note: when a VM is created from scratch it appears to select the correct network adapter type. When I copied the VDI file to my laptop and setup a VM based on that VDI file, it picked a different adapter by default and the networking didn’t work until I made it match the original Network settings that I had when I first configured it.

2. Start up your VM, open up a command prompt and run  ipconfig. Notice the new Local Area Connection 2 should be in your local network. The other is the default NAT adapter that allows your VM to see the Internet as your host computer.


3. On your host computer go to C:\Windows\System32\drivers\etc and edit your hosts file and add the new IP address to your hosts file.


4.You may want to add a new Credential to your Credential Manager to reduce your login time under Control Panel since you are not in the domain of the VM.

Use the Hosts alias created above, then add a domain\username, and password. This will give you a mostly filled out login when you try to reach the website for the first time.


5.  Test the connection out by bringing up MS CRM on your host. I’m using the alias in my hosts file pull up CRM.  http://w2008r2crmdev:5555/CRMDEMO


6. Now make sure you can access the endpoints through the browser



7. If the endpoints show up in the browser than they should be available to add a reference to a Silverlight project as shown below.

VS Service Reference MetaData

Side Note: I have found that this VM is capable of running with 2.3Gb of RAM and on one core on my 2 year old Core Duo laptop. There is just enough memory to run VS 2010 on the host and connect to the guest VM’s endpoints as shown above in the 4Gb of RAM my laptop has. This is by no means an optimum configuration, but it is possible to demonstrate CRM 2011 beta with SharePoint integration and write code against both SDK’s.


Shweta-Amol said...

Thanks for the post Mark!

Unknown said...

Can you help me out here Mark.
I set the Adapter 1 to NAT and Adapter 2 to Virtual Host-Only Ethernet Adapter.

My ipconfig in VM shows these two IPs: and;

I set the "" as "w2008r2crmdev" in hosts file in host machine(Windows 7). Also made the appropriate entry in Windows Credentials.

I cannot browse the crm2011 website from host. But I can browse it within the vm.

My host is connected to a wireless router and IPconfig shows:
Virtual Host-Only: and Wireless LAN: with gateway 10.0.01 and subnet mask:

Can you suggest wat could be the problem here?