microsoft / MSLab

Azure Stack HCI, Windows 10 and Windows Server rapid lab deployment scripts
MIT License
1.17k stars 280 forks source link

Add a NoDCHydrate feature to defer DC creation to step 3 #596

Open michbern-ms opened 1 month ago

michbern-ms commented 1 month ago

This change creates a NoDCHydrate feature to defer DC creation to step 3.

This works around an issue where the Server 2025 Domain Controller does not respond well to being dehydrated and rehydrated.

The change also adds named-VHD support for WS2025.

Karl-WE commented 3 weeks ago

@machv @jaromirk do you intent to merge this. Checking the latest release I was not sure if it is included.

machv commented 3 weeks ago

@Karl-WE i will look on this over the weekend, I want to test this scenario also with older versions of win server before merging.

Karl-WE commented 3 weeks ago

Thank you for going the extra mile @machv

michbern-ms commented 3 weeks ago

Thank you, @machv . I did test with Server 2022, but it would be great to get independent confirmation. I'm happy to fix anything you find. I got into this just to fix the issue for Karl but I'm growing rather fond of these scripts.

jaromirk commented 3 weeks ago

Folks, I added some more stuff into DC hydration as I found breaking bug in networking stack. So now it also installs Hyper-V in DC and adds vswitch. It simplifies a bit this scenario https://github.com/DellGEOS/AzureStackHOLs/tree/main/lab-guides/04-TestingLogicalNetworks. Unfortunately it will also break this PR. I also added Ws2025 version into parent disks creation, so it will no longer be created as insider preview vhd.

michbern-ms commented 3 weeks ago

Thanks, @jaromirk -- I merged your changes and re-pushed. I re-tested Server 2025 (with NoDehydrateDC=$true) and Server 2022 (with NoDehydrateDC=$false).