Thursday, 4 October 2012

VMWare workstation setup

Problem:  Occasionally I need to setup VM's on VMware workstation for development environments and I always forget the steps so this post aims to record a basic set of steps to get multiple VM's on VMware workstation 7 on a corporate network.  It works the same way for VMware 8.  This is not my area of expertise but it will hopefully help me in future and any other SharePoint dev.  This post expinas the networking when using VMware workstation 7.

Architecture Overview:  I have Windows 7 x64 on my host physical workstation with 16 GB of RAM.  I have 3 VM's in my dev environment to host VS, SP2010 & FAST.
VM1: Windows 2008 R2 that is my domain controller (1 CPU & 1GB RAM)
VM2:  Windows 2008 R2 with SQL Server 2012 Developer edition, VS 2010 SP1 Ultimate with VS SP SDK, Azure tools version 1.7, SP2010 SP1 with CU's (4 CPU's & 10 GB RAM)
VM3: Windows 2008 R2 with FAST (2 CPU's & 3GB RAM).
This architecture is good as all dev can use the clones and merely need the PC/laptop making them agnostic of the clients architecture.

Networking Summary:
(The internal networked VM's work together in a private network, the VM's can reach out to the Internet & the last step is to add access to the SharePoint websites via the network editor.

1.> Install VMware 8 I am using version 7 as that is what my licence is (about £150) on the host.  I then built the machines explained in my "Architecture Overview" section. 
2.> Edit the network setting on VM1 (My DC).  Set the networking to NAT.
3.> Open the "Virtual Network Editor" (Hint: this is in you program files under the VMware folder).
Select the NAT networking type and click the "NAT Settings.." button.
4.> In the "NAT Settings" dialog popup window record the Gateway IP (you will use this on the VM network card IP4 network settings to give you Internet access).
5.> Power up the VM (in my scenario this is VM1 - DC) from the VMware Workstation client console.
6.> Remote into VM1.  Edit the network adaptor settings as shown below (note: that the Default gateway is the ip adr stored from the look at the "VMware network editor" in step 4.  (Hint: I use the 192.168.1.* for my IP numbers but use as you see appropriate).
7.> Open IE on VM1 and check networking is working.
8.> Optional hint:  You may need to enter proxy details on the VM.  To do this get you proxy setting from IE on the host machine.  Check you can ping the proxy (if you can't you'll need to add a hosts entry on VM1).  Open IE > Internet options > Connections tab >Lan Setting > add the proxy details.  At this powering also bypass the local urls for the proxy server (Advanced button), this allows you to access the local web sites.
9.> Repeat the same steps on the other VM's.

Setup http & rdp access fromt he corprate network.
1.> Open the "Virtual Network Editor" on the host machine.
2.> Select the NAT networking type and click the "NAT Settings.." Button.
3.> Add "Port Forwarding" setting.  The entry highlighted does http passthru to VM2 (my SharePoint VM).  You will need to also add port forward for rdp access (also ensure the VM allows remote access).

4.> Open the RDP client tool and enter the IP of the host machine and the port number you will be going to the host on (editor with translate the port)

Note: Only 1 port can be used on the host, so if you have multiple IIS instances on different VM's you can't access them simultaneously.


Post a Comment