Having built a low-powerÂ server to run my home infrastructure, I need to get moving on decommissioning the old virtual machines so I can turn off the Dell PowerEdge 840 that runs them.
The first step was to migrate the Active Directory Domain Services from my existing Windows Server 2003 R2 SP2 installation to the new Windows Server 2008 R2 machine:
- On the 2003 DC, insert the 2008 R2 DVD and open a command prompt.
adprep32.exeif running on a 32-bit architecture – I was already running 64-bit) in the \support\adprep folder (note the changed file location between Windows Server 2008 and 2008 R2 – it used to be in \sources\adprep) and run the following commands (theres more detail on these actions in Daniel Petri’s article on Windows Server 2008 ADprep):
adprep /forestprep(on the schema master for the forest)
adprep /domainprep(on the infrastructure master for each domain, after making sure that the domain is in at least Windows 2000 native mode)
adprep /domainprep /gpprep(on the infrastructure master for each domain)
adprep /rodcprep(if read only domain controllers are required in a Windows Server 2003 forest)
- After this, I ran
dcpromo.exeon the new server, promoting it to a domain controller in the existing forest/domain, electing to make the server a DNS server and a Global Catalog server at the same time.
- With the new server running as a DC, I needed to transfer the FSMO roles.Â I did this by following the advice in Microsoft knowledge base article 324801Â to: register scmmgmnt.dll; run the Active Directory Schema and transfer the Schema Master role; run Active Directory Domains and Trusts and transfer the Domain Naming Master role; run Active Directory Users and Computers and transfer the RID Master, PDC Emulator and Infrastructure Master Roles.Â Incidentally, even though IÂ did this with the GUI tools, Adam Bell outlines a much smarter method to transfer FSMO roles using PowerShell.
- After checking that the new server’s DNS service successfully performed simple and recursive lookups (on the Monitoring tab in the DNS Server properties) then switching the new server’s primary DNS server to use itself (rather than the old DC), I ran
dcpromo.exeon the 2003 server to demote it to a normal domain member, before ensuring that all computers were using the new (2008 R2) DNS server and removing the role from the 2003 computer.
- With Active Directory and DNS migrated, the last major service to move was DHCP (I do have some other services running on a separate server: TFTP, phone directory web service, etc. running on another server but they are application services really – this post will concentrate on the infrastructure).Â This is pretty straightforward (details can be found on the Microsoft Enterprise Networking team blog) and involves a couple of commands – one to export from the 2003 R2 server and another to import on the 2008 R2 server:
netsh dhcp server export <em>filename</em> all
netsh dhcp server import <em>filename</em> all
- After confirming thatÂ the DHCP service was running on the target withÂ all entries transferred, I stopped the DHCP Server service on the source (
net stop "DHCP Server"),Â and renewed a client IP address (by starting up a PC, but running
ipconfig /renewwould have been as effective) to check that renewals worked before restarting the service (
net start "DHCP Server"), deauthorising the original DHCP serverÂ and removing the DHCP role.
- If I was using the Encrypted File System or the server was a Terminal Services Licensing Server there would be some extra steps (not for me).
- Finally, with all services removed from the 2003 machine, I shut it down, deleted the virtual machine files from the host server, and removed the computer account from Active Directory, which can now have the forest and domain functional levels raised if necessary, as I’m completely free from legacy domain controllers.