Skip to content
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

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

michbern-ms
Copy link

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

  • Refactor the code to hydrate the DC into its own function, Hydrate-DC
  • Call the function as usual in step 2 to maintain current functionality
  • Add a NoDCHydrate switch in LabConfig to enable the DC to be hydrated during Deploy instead of CreateParentDisks

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.

Michael Bernstein (DPLAT) added 3 commits June 12, 2024 16:09
- Refactor the DC Hydration code out
- Add a mode to avoid dehydrating the DC and to instead create it during deployment
- Add support for Server 2025 images by name
@Karl-WE
Copy link
Contributor

Karl-WE commented Jun 20, 2024

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

@machv
Copy link
Collaborator

machv commented Jun 21, 2024

@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
Copy link
Contributor

Karl-WE commented Jun 21, 2024

Thank you for going the extra mile @machv

@michbern-ms
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

michbern-ms commented Jun 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants