microsoft / MSLab

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

DC.vhdx stays "open by the system" state after premature ending of CreateParentdisks.ps1 #511

Closed aarseven closed 2 years ago

aarseven commented 2 years ago

I'm using straight the latest labfiles zip w/o any modifications and it ends during DC feature creation prematurely with the errors below. Testing it on a Win11 machine, could there be any incompatibilities with Powershell version etc?

Creating DSC Configs for DC Test-DependsOn : The format of the resource reference '[WindowsFeature]ADDSInstall' in the Requires list for resource '[ WindowsFeature]FeatureGPMC' is not valid. A required resource name should be in the format '[]', with al phanumeric characters, spaces, '_', '-', '.' and '\'. At line:118 char:13

when the script stops, the dc.vhdx stays mounted and cannot be deleted without a restart. above errors repeating for all the modules defined for config of the DC and thus cannot move forward with the lab prep.

aarseven commented 2 years ago

SOLVED: surprise surprise! it was a problem with locale settings. Although I was using a en-us ISO etc I have realized powershell somehow interprets the ' and " for variable definitions in a strange way - thus possibly causing the above series of errors. Changed region to US and it works. easy to repro. not sure if I'm the only one hit on that.