Windows Server 2025 Core Domain Controller Migration
This runbook covers the migration from home-dc01 (Windows Server 2022 with AD + AD CS + DNS) to a new Windows Server 2025 Core deployment with Active Directory only.
|
Architecture Change
|
1. Pre-Migration Checklist
| Step | Verification | Status |
|---|---|---|
DNS on pfSense |
All clients resolving via 10.50.1.1 |
[ ] |
Vault PKI operational |
|
[ ] |
Vault issuing certs |
Test cert issued from |
[ ] |
ISE trusts Vault CA |
DOMUS-ROOT-CA in ISE trusted store |
[ ] |
AD replication healthy |
|
[ ] |
Current DC backed up |
Full system state backup completed |
[ ] |
2. Architecture
3. Phase 1: Verify Prerequisites
3.1. 1.1 Verify DNS on pfSense
From a Linux workstation:
# Test DNS resolution via pfSense
dig @10.50.1.1 home-dc01.inside.domusdigitalis.dev
# Verify all clients using pfSense DNS
cat /etc/resolv.conf
# Should show: nameserver 10.50.1.1
3.2. 1.2 Verify Vault PKI
# Load Vault credentials
dsource d000 dev/vault
# Check PKI mounts
vault secrets list | grep pki
# Verify CA chain
vault read pki/cert/ca
vault read pki_int/cert/ca
# Test certificate issuance
vault write pki_int/issue/domus-server \
common_name="test.inside.domusdigitalis.dev" \
ttl="24h"
4. Phase 2: Deploy Windows Server 2025 Core
4.1. 2.1 VM Specifications
| Resource | Value |
|---|---|
RAM |
4 GB (minimum for Core) |
vCPUs |
2 |
Disk |
40 GB (Core requires less) |
Network |
Bridge to VLAN 1 (10.50.1.0/24) |
ISO |
Windows Server 2025 Standard (Core) |
4.2. 2.2 Create VM on KVM
# Download virtio drivers if needed
# https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/
# Create VM
sudo virt-install \
--name home-dc02 \
--ram 4096 \
--vcpus 2 \
--disk path=/var/lib/libvirt/images/home-dc02.qcow2,size=40,bus=virtio \
--os-variant win2k22 \
--network bridge=br0,model=virtio \
--graphics vnc,listen=0.0.0.0 \
--cdrom /var/lib/libvirt/images/iso/windows_server_2025.iso \
--disk path=/var/lib/libvirt/images/iso/virtio-win.iso,device=cdrom
4.3. 2.3 Windows Server Core Installation
During installation:
-
Select Windows Server 2025 Standard (Server Core Installation)
-
Accept license terms
-
Select Custom: Install Windows only
-
Load virtio drivers from second CD (virtio-win.iso):
-
Browse to
viostor\2k22\amd64 -
Browse to
NetKVM\2k22\amd64
-
-
Select disk and install
4.4. 2.4 Initial Configuration (sconfig)
After first boot, use sconfig menu:
===============================================================================
Server Configuration
===============================================================================
1) Domain/Workgroup: Workgroup: WORKGROUP
2) Computer Name: WIN-XXXXXXXX
3) Add Local Administrator
4) Configure Remote Management Enabled
5) Windows Update Settings: Manual
6) Download and Install Updates
7) Remote Desktop: Disabled
8) Network Settings
9) Date and Time
10) Telemetry settings: Required
11) Windows Activation
12) Log Off User
13) Restart Server
14) Shut Down Server
15) Exit to Command Line
Enter number to select an option:
4.4.2. Configure Network (Option 8)
# Select adapter index (usually 1)
# Select option 1 - Set Network Adapter Address
Select (D)HCP or (S)tatic IP address: S
Enter static IP address: 10.50.1.51
Enter subnet mask: 255.255.255.0
Enter default gateway: 10.50.1.1
4.4.3. Set DNS Server
# Still in Network Settings
# Select option 2 - Set DNS Servers
Enter new preferred DNS server: 10.50.1.50
Enter alternate DNS server: 10.50.1.1
4.5. 2.5 Post-Restart Configuration (PowerShell)
Press 15 in sconfig to exit to command line, then:
# Start PowerShell
powershell
# Verify network configuration
Get-NetIPConfiguration
# Test connectivity to existing DC
Test-Connection home-dc01.inside.domusdigitalis.dev
# Test DNS resolution
Resolve-DnsName home-dc01.inside.domusdigitalis.dev
5. Phase 3: Join Domain and Promote
5.1. 3.1 Join Domain
# Add to domain
Add-Computer -DomainName inside.domusdigitalis.dev -Credential (Get-Credential)
# Enter domain admin credentials when prompted
# Restart
Restart-Computer
5.2. 3.2 Install AD DS Role
After restart, open PowerShell:
# Install AD DS role
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
# Verify installation
Get-WindowsFeature AD-Domain-Services
5.3. 3.3 Promote to Domain Controller
# Import AD deployment module
Import-Module ADDSDeployment
# Promote to DC (replicating from existing DC)
Install-ADDSDomainController `
-DomainName "inside.domusdigitalis.dev" `
-SiteName "Default-First-Site-Name" `
-ReplicationSourceDC "home-dc01.inside.domusdigitalis.dev" `
-DatabasePath "C:\Windows\NTDS" `
-LogPath "C:\Windows\NTDS" `
-SysvolPath "C:\Windows\SYSVOL" `
-NoGlobalCatalog:$false `
-InstallDns:$false `
-SafeModeAdministratorPassword (Read-Host -AsSecureString "DSRM Password") `
-Force:$true
# Server will restart automatically
|
We use |
5.4. 3.4 Verify Replication
After restart, verify AD replication:
# Check replication status
repadmin /replsummary
# Check replication partners
repadmin /showrepl
# Verify DC registration
Get-ADDomainController -Filter * | Select-Object Name, IPv4Address, OperatingSystem
# Test LDAP connectivity
Get-ADUser -Filter * -Server home-dc02.inside.domusdigitalis.dev | Select-Object -First 5
6. Phase 4: Transfer FSMO Roles
6.1. 4.1 Check Current FSMO Holders
# View current FSMO role holders
netdom query fsmo
# Or via PowerShell
Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster
Get-ADDomain | Select-Object InfrastructureMaster, PDCEmulator, RIDMaster
6.2. 4.2 Transfer All FSMO Roles
From home-dc02 (PowerShell as Administrator):
# Transfer all roles to home-dc02
Move-ADDirectoryServerOperationMasterRole `
-Identity "home-dc02" `
-OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster `
-Force
# Verify transfer
netdom query fsmo
6.3. 4.3 Update DNS Records
On pfSense or DNS server:
# Update A records
home-dc02.inside.domusdigitalis.dev -> 10.50.1.51
# Update SRV records for AD
_ldap._tcp.inside.domusdigitalis.dev -> home-dc02.inside.domusdigitalis.dev
_kerberos._tcp.inside.domusdigitalis.dev -> home-dc02.inside.domusdigitalis.dev
7. Phase 5: Decommission Old DC
|
Do not proceed until:
|
7.1. 5.1 Verify Services Using New DC
# From Linux workstation - test 802.1X auth
nmcli connection up "Wired-802.1X"
# Check ISE auth logs
netapi ise mnt sessions
# Verify LDAP binds going to new DC
netapi ise dc session --filter "home-dc02"
7.2. 5.2 Demote Old DC
On home-dc01 (PowerShell as Administrator):
# Demote to member server
Uninstall-ADDSDomainController `
-DemoteOperationMasterRole:$true `
-RemoveDnsDelegation:$true `
-LocalAdministratorPassword (Read-Host -AsSecureString "Local Admin Password") `
-Force
# Server will restart
7.3. 5.3 Remove AD CS Role
After demotion, remove the deprecated CA:
# Remove AD CS role
Uninstall-WindowsFeature AD-Certificate-Services -IncludeManagementTools
# Clean up CA database
Remove-Item -Recurse -Force C:\Windows\System32\CertLog\
7.4. 5.4 Unjoin and Shutdown
# Remove from domain
Remove-Computer -UnjoinDomainCredential (Get-Credential) -Force -Restart
After restart, shut down the old VM:
# On KVM host
sudo virsh shutdown home-dc01
# Optional: Remove VM after verification period
# sudo virsh undefine home-dc01 --remove-all-storage
8. Phase 6: Post-Migration Verification
8.1. 6.1 AD Health Check
# On home-dc02
# Check AD services
Get-Service NTDS, Netlogon, KDC | Select-Object Name, Status
# Check replication (should show only home-dc02)
Get-ADDomainController -Filter * | Select-Object Name, IPv4Address
# Verify FSMO roles
netdom query fsmo
8.2. 6.2 Linux Client Verification
# Test Kerberos
kinit user@INSIDE.DOMUSDIGITALIS.DEV
klist
# Test LDAP
ldapsearch -H ldap://home-dc02.inside.domusdigitalis.dev -b "dc=inside,dc=domusdigitalis,dc=dev" -Y GSSAPI
# Test 802.1X authentication
nmcli connection up "Wired-802.1X"
netapi ise mnt sessions
9. Phase 7: Documentation Updates
9.1. 7.1 Update Infrastructure Docs
| Document | Update Required |
|---|---|
domus-infra-ops/architecture/ip-addressing.adoc |
Update DC IP from 10.50.1.50 to 10.50.1.51 |
domus-ise-linux/02-pki/windows-adcs.adoc |
Mark as deprecated, reference Vault |
All antora.yml files |
Update |
10. Rollback Procedure
|
If issues occur before decommissioning old DC:
|
# On home-dc01 - reclaim FSMO roles
Move-ADDirectoryServerOperationMasterRole `
-Identity "home-dc01" `
-OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster `
-Force
11. Appendix: Windows Server Core Quick Reference
11.1. Common Commands
| Task | Command |
|---|---|
Open Server Configuration |
|
Open PowerShell |
|
Check IP Configuration |
|
Restart Server |
|
Check Services |
|
Check Event Logs |
|
Remote Management |
|