inVURTED.com

With great virtualisation comes great responsibility!

[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.

vmware player windows 2008 tutorial

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.

vmware player windows 2008 tutorial

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.

vmware player windows 2008 tutorial

Select the “I copied it” option and press OK.

vmware player windows 2008 tutorial

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.

From a DOS prompt, type hostname and press enter.
vmware player windows 2008 tutorial

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:

vmware player windows 2008 tutorial

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).

Tagged as: , ,
  • zeeshan

    This is just Awsome.Extremly helpfull and user friendly.You arejusta dude.

  • Adam Jones

    I’m glad you got so much out of them. From this point, the sky’s the limit as to where to go … exchange, SQL, the possibilities are endless!

  • zishan

    Hey Adam here is something that I would like to bring to your notice may be you could figure out if I was going wrong somewhere. When I pinged my server from client it pinged properly.not only that when i joined the client computer to the domain I saw my client PC appearing in AD of server machine ( users and computer ).This leaves me an impression that there is no doubt that Client very well found the DC.But here is something very funny going on.When i log in to my client with administrator log in or a user defined in DC it logs into it even when the server machine is shut.if I change the DNS to something else lets say 192.168.0.25 in client which is not the IP of server (198.168.0.10 given in your tutorial) even then it logs into the server.One more thing.I had created a user which worked fine for sometime I mean I am testing so was trying different options.I realized that even when the user is disabled in AD yet client is able to Log in with that user credentials.Here is the surprise i Even deleted the user from active directory yet it logs into the machine. I wonder how come when the domain control is shut or the DNS address is changed in the client or when the user is disabled or deleted then why or from where the my client ( xp VM ) is able to log in.Is is VM ware fault or some twiking is required.Kindly suggest and reply back.I would like to thank you once again for such a simplified post which gave me a kick start to networking.will wait for your reply

  • http://twitter.com/invurted Adam Jones

    I would check for cached credentials on the Windows client. Most of what you describe looks like the AD credentials being used to authenticate the user when the Active Directory is not available.

  • Peter

    I completed the first two tutorials but get stuck on this one. When I try to set the static dns ip address to 192.168.0.10 I get “The configured DNS server is incorrect or does not exist.”
    Any ideas where I went wrong?
    Thanks!