[TUTORIAL] Windows 2008 testing environment using Vmware Player part 3
In Part 1 and Part 2 we looked at deploying the start of an Active Directory using Vmware Player for testing purposes. In Part 3 we’ll look at deploying additional virtual machines and promoting them to domain members.
At the completion of Part 2, we should have one “template” virtual machine that will be copied each time we need a new VM and one deployed domain controller for the domain of our choice (invurted.local).
Building on this we want an additional member server for the domain. This server will use the Active Directory to authenticate users.
As in Part 2, there are two options for deploying a virtual machine
a) Build it from scratch, or;
b) Copy an existing virtual machine and copy it.
For ease of deployment, we are going to copy the _TMPL-inv-dc01 virtual machine.
Right click and select Copy on the directory of _TMPL-inv-dc01. In the same directory, right click and select Paste or use the Edit menu in Windows Explorer to paste. This may take a couple of minutes to copy. The virtual machine that we built takes up 6.50 GB (6,983,880,704 bytes) on my hard drive.
Once the copy is complete, we can rename the new copy to something more meaningful than _TMPL-inv-dc01 – Copy. Right click on the folder that has been created, select rename and call it inv-srv01.
Now the virtual machine is ready to start up. At this point, be aware that there are some Windows 2008 configuration changes needed before we can make the server a domain member. The IP address and machine name, at the least, will need to be changed.
Because the files for the machine are a direct copy of the “template”, the following should happen.
As you can see, the directory is called inv-srv01 and the Vmware virtual machine configuration (.vmx extension) still has the inv-dc01 name. This is not a major problem and can be fixed by right clicking the file, selecting Rename and changing the name to inv-srv01. DO NOT change the contents of the file as it contains configuration information that points to other files in the directory. Improperly edits can result in non-bootable virtual machines.
Once the file is renamed, open it using Vmware Player and the wait for the virtual machine to boot. Hopefully you get the following dialogue box.
Select the “I copied it” option and press OK.
We are immediately prompted to install Vmware Tools in the new virtual machine. The template that we made was post-operating system installation, but pre-install of Vmware Tools. Choose to either install now or be reminded later.
When we run an ipconfig in the virtual machine, the IP address is allocated from a DHCP pool that is managed by Vmware Player. This IP address won’t be able to communicate with the domain that we created and, therefore, won’t be able to join the domain.
Setting the IP address can be done any number of ways, the previous tutorial used the netsh command:
The interface that we are interested in is Local Area Connection.
netsh interface ip set address name="Local Area Connection" static 192.168.0.20 255.255.255.0 192.168.0.1 1
and, most importantly, set the DNS IP address. This is required to join the domain successfully. Again, at the command prompt:
netsh interface ip set dns "Local Area Connection" static 192.168.0.10
Now we can join the domain. There are multiple ways to joing the domain, but we’re doing so much at the command line, we may as well keep going.
The hostname is the randomly generated when we created the virtual machine and installed the Windows 2008 operating system. Renaming the computer will be done using the command line and the command NETDOM. We are still not part of the domain. so the command syntax is pretty straight forward:
netsh renamecomputer win-agimt9cb3rv /newname inv-srv01
The renamecomputer win-agimt9cb3rv will change to whatever your hostname is.
This command will require a reboot to apply the new name. Once rebooted, login and open a command prompt again.
Test connectivity to the network, ping invurted.local. Any response from the network is considered successful. Again, from the command line:
netdom join inv-srv01 /domain:invurted.local /userd:administrator /passwordd:P@ssw0rd
This command requires a reboot when successful. If it fails, check your IP address and, especially, DNS address to make sure they are right.
Once rebooted, login as username invurted\administrator with the password word P@ssw0rd and now we have one domain joined Windows 2008 server!
That’s Part 3 complete. Any suggestions where to go from here? Please email me (contactme [at] invurted dot com).