To quickly set lab environment I use VPC 2007 (free download). It really saves me lots of time. For example, in order to set up environment to test impersonation, delegation, and protocol transition as described in Authentication Hub post I needed one machine for Active Directory domain (Windows Server 2003), one machine for development desktop (Windows XP), two machines as web servers (Windows Server 2003), I also set another Windows Server 2003 as Certificate Authority to issue certificates which I used in SOA, Strong Authentication, Standard Authorization – Cool Solution.
Here are the steps I have taken:
- Create 4 folders: AD,”Web Service 1″,”Web Service 2″,”CA”, “Base Image”.
- Create new virtual machine based on Windows Server 2003 while storing its vmc and vhd files in AD folder
- Copy the resulted virtual hard disk (VHD) into “Base Image” folder – this will serve as base image for another cloned machines.
- Run dcpromo to convert the virtual machine into domain controller.
- In VPC setting configure networking “Local only” for all machines – this enable them to communicate each with other without connecting to actual network. Good when one needs to comply with corp network policy.
- Copy VHD file from “Base Image” folder into “Web Service1” folder.
- Create another virtual machine telling the wizard to use existing VHD in “Web Service1” folder.
- Now run inside “Web Service1” virtual machine NewSID (free download) utility to generate new seed for the newly created machine. This is needed to successfully add the machine to Domain.
- Configure “Web Service1” virtual machine networking – give it static IP and configure its Preferred DNS Server for Domain’s controller IP:
- Join the “Web Service1” machine to domain.
Now I have, Active Directory domain with two machine and similar procedure is needed to add more machines.
One thing that made me work hard while troubleshooting networking between the virtual machines is to make sure that VM’s have different MAC addresses.
Inside every machine run ipconfig /all and make sure Physical Address value is different for each machine:
If it is the same – change it opening VMC file which is simple XML file and change the value of <ethernet_card_address type=”bytes”>0003FF44337E</ethernet_card_address>. Your value may be other than 0003FF44337E.
After doing this I was able to set my environment and make my machines talk to each other.
Be aware of licensing and supportability issues described in NewSID v4.10 regarding copying images while utilizing NewSID.