-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Can not install a secondary DC (role = DC) #1629
Comments
I made a bit of progress today. I noticed that the first DNS server of the secondary DC is pointing to itself during installation. I performed a few tests and DNS resolution to find the domain is broken with that setup. If I manually set the first dns server to point to the first installed DC, the installation is successful. Is this a bug or did I configure something incorrectly? I've simplified the script to this: $labName = 'Security'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.12.0/24
Add-LabVirtualNetworkDefinition -Name 'External Virtual Switch' -HyperVProperties @{SwitchType = 'External'; AdapterName = 'vEthernet (External Virtual Switch)'}
#and the domain definition with the domain admin account
Add-LabDomainDefinition -Name 'security.local' -AdminUser Install -AdminPassword Somepass1
Set-LabInstallationCredential -Username Install -Password Somepass1
#Set the parameters that are the same for all machines
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:Network' = $labName
'Add-LabMachineDefinition:Processors' = 4
'Add-LabMachineDefinition:Memory' = 4GB
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2022 Standard Evaluation (Desktop Experience)'
}
$netAdapterRouter = @()
$netAdapterRouter += New-LabNetworkAdapterDefinition -VirtualSwitch $labName
$netAdapterRouter += New-LabNetworkAdapterDefinition -VirtualSwitch 'External Virtual Switch' -UseDhcp
#Defining contoso.com machines
Add-LabMachineDefinition -Name LABDC1 -IpAddress 192.168.12.10 `
-DomainName 'security.local' -Roles RootDC
Add-LabMachineDefinition -Name LABDC2 -IpAddress 192.168.12.11 `
-DomainName 'security.local' -Roles DC
Add-LabMachineDefinition -Name Router -Roles Routing -NetworkAdapter $netAdapterRouter
Install-Lab
Show-LabDeploymentSummary -Detailed |
Update 2: I've noticed that each time I use a new $AddressSpace, the installation was successful, so it's something that sticks on my machine and messes with the network in some way. This is what I now have as a procedure which is successful 90% of the time: Remove-Lab -Name Security -RemoveExternalSwitches
Remove the Lab Switch Manually (This does not get removed when invoking the command above)
get-LabVirtualNetworkDefinition | remove-LabVirtualNetworkDefinition
get-LabVirtualNetworkDefinition (Check if anything is left)
ipconfig /flushdns Manually remove the lab directory in C:\ProgramData\AutomatedLab\Labs That seems to improve the success of installation for a great deal. If there's anything else you want me to try or if you have any hints, tips or tricks, I would be happy to help. |
Description
I'm not able to install a second domain controller in a domain, the ALDCPromo log file contains these errors:
Windows PowerShell transcript start
Start time: 20240414192408
Username: LAB-DC02\Administrator
RunAs User: LAB-DC02\Administrator
Configuration Name: Microsoft.PowerShell
Machine: LAB-DC02 (Microsoft Windows NT 10.0.20348.0)
Host Application: C:\Windows\system32\wsmprovhost.exe -Embedding
Process ID: 8064
PSVersion: 5.1.20348.2227
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.20348.2227
BuildVersion: 10.0.20348.2227
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
ALDCPromo.log
powershell_support_pack_2024_04_14-20_04_45.zip
Steps to reproduce the issue
PowerShell Version
AutomatedLab Version
The text was updated successfully, but these errors were encountered: