azure - 在创建新的 AD 林和域期间重新启动后,具有 DSC 扩展的 ARM 模板失败并出现安全错误

标签 azure dsc

几个月来,我一直可靠地使用 ARM 模板来创建主域 Controller 和备份域 Controller (基于快速启动模板中的“active-directory-new-domain-ha-2-dc”)。周五,它停止工作,没有进行任何修改。

问题出在主 DC 上。 xADDomain DSC 资源触发重新启动,如第一个 DSC 日志的摘录所示:

VERBOSE: [2020-05-22 15:22:17Z] [VERBOSE] [tipaADPDC]: LCM:  [ End    Resource 
]  [[xADDomain]FirstDS]
VERBOSE: [2020-05-22 15:22:17Z] [VERBOSE] [tipaADPDC]:                         
   [] A reboot is required to progress further. Please reboot the system. 
Configuration will not be continued after the reboot. To continue 
configuration, use Start-DscConfiguration -UseExisting after reboot.
VERBOSE: [2020-05-22 15:22:17Z] [WARNING] [tipaADPDC]:                         
   [] A reboot is required to progress further. Please reboot the system. 
Configuration will not be continued after the reboot. To continue 
configuration, use Start-DscConfiguration -UseExisting after reboot.

重新启动后,可以在第二个 DSC 日志中看到以下安全错误:

VERBOSE: [2020-05-22 15:23:28Z] Will continue the existing configuration. 
Executing Start-DscConfiguration with -UseExisting option ...
VERBOSE: [2020-05-22 15:23:28Z] Settings handler status to 'transitioning' 
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
VERBOSE: [2020-05-22 15:23:29Z] [VERBOSE] Perform operation 'Invoke CimMethod' 
with following parameters, ''methodName' = ApplyConfiguration,'className' = 
MSFT_DSCLocalConfigurationManager,'namespaceName' = 
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: [2020-05-22 15:23:29Z] [ERROR] WinRM cannot process the request. The 
following error with errorcode 0x80090350 occurred while using Negotiate 
authentication: An unknown security error occurred.

由于 ARM 模板或 DSC 资源没有发生任何更改,我认为这是由于部署选择了最新版本的内容。

我尝试过的事情:

  1. 使用 DSC 2.76 而不是 2.80
  2. 使用 WMF 5.0 而不是 5.1
  3. 使用 Windows Server 2019-Datacenter 而不是 2016(看起来 自 20190603 以来,2016 年的镜像就没有更新过)。

我还研究了如何防止 DSC 在重新启动后重新启动(没有更多资源需要处理)。但是,我认为由于第一个 DSC 日志中的以下条目,这些设置已经完成:

VERBOSE: [2020-05-22 15:18:42Z] WMF 5 or newer, Injecting RebootNodeIfNeeded = 
False and ActionAfterReboot = "StopConfiguration"

VERBOSE: [2020-05-22 15:18:47Z] Get-DscLocalConfigurationManager: 
ActionAfterReboot              : StopConfiguration
RebootNodeIfNeeded             : False

我被困住了。有人有什么想法吗? 谢谢。

最佳答案

最近遇到了类似的问题。有点不同的是,我使用的是 ActiveDirectoryDsc,而不是 xADDomain。 。 当我将操作系统升级到 Windows Server 2019-Datacenter 时,错误消失了。

潜在的根本原因可能是 2016 年至 2019 年之间的 Powershell 版本所致。这是我的日志。

  1. Windows Server 2016
VERBOSE: [2020-06-01 03:47:34Z] Settings handler status to 'transitioning' 
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
VERBOSE: [2020-06-01 03:47:34Z] Retrieving system information ...
VERBOSE: [2020-06-01 03:47:40Z]     OS Version : 10.0
VERBOSE: [2020-06-01 03:47:40Z]     Server OS  : True
VERBOSE: [2020-06-01 03:47:40Z]     64-bit OS  : True
VERBOSE: [2020-06-01 03:47:40Z]     PS Version : 5.1.14393.3471
VERBOSE: [2020-06-01 03:47:40Z] Validating user provided settings for the DSC 
Extension Handler ...

重启后

VERBOSE: [2020-06-01 03:53:05Z] Settings handler status to 'transitioning' 
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
VERBOSE: [2020-06-01 03:53:05Z] Will continue the existing configuration. 
Executing Start-DscConfiguration with -UseExisting option ...
VERBOSE: [2020-06-01 03:53:05Z] Settings handler status to 'transitioning' 
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
VERBOSE: [2020-06-01 03:53:07Z] [VERBOSE] Perform operation 'Invoke CimMethod' 
with following parameters, ''methodName' = ApplyConfiguration,'className' = 
MSFT_DSCLocalConfigurationManager,'namespaceName' = 
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: [2020-06-01 03:53:07Z] [ERROR] WinRM cannot process the request. The 
following error with errorcode 0x80090350 occurred while using Negotiate 
authentication: An unknown security error occurred.  

 Possible causes are:

  -The user name or password specified are invalid.

  -Kerberos is used when no authentication method and no user name are 
specified.

  -Kerberos accepts domain user names, but not local user names.

  -The Service Principal Name (SPN) for the remote computer name and port does 
not exist.

  -The client and remote computers are in different domains and there is no 
trust between the two domains.

 After checking for the above issues, try the following:

  -Check the Event Viewer for events related to authentication.

  -Change the authentication method; add the destination computer to the WinRM 
TrustedHosts configuration setting or use HTTPS transport.

 Note that computers in the TrustedHosts list might not be authenticated.

   -For more information about WinRM configuration, run the following command: 
winrm help config.
VERBOSE: [2020-06-01 03:53:07Z] [VERBOSE] Operation 'Invoke CimMethod' 
complete.
VERBOSE: [2020-06-01 03:53:07Z] [VERBOSE] Time taken for configuration job to 
complete is 0.039 seconds
  • Windows Server 2019
  • VERBOSE: [2020-06-01 08:33:17Z] Settings handler status to 'transitioning' 
    (C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
    VERBOSE: [2020-06-01 08:33:18Z] Retrieving system information ...
    VERBOSE: [2020-06-01 08:33:22Z]     OS Version : 10.0
    VERBOSE: [2020-06-01 08:33:22Z]     Server OS  : True
    VERBOSE: [2020-06-01 08:33:22Z]     64-bit OS  : True
    VERBOSE: [2020-06-01 08:33:22Z]     PS Version : 5.1.17763.1007
    VERBOSE: [2020-06-01 08:33:22Z] Validating user provided settings for the DSC Extension Handler ...
    

    重启后

    VERBOSE: [2020-06-01 08:38:49Z] Settings handler status to 'transitioning' 
    (C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
    VERBOSE: [2020-06-01 08:38:49Z] Will continue the existing configuration. Executing Start-DscConfiguration with 
    -UseExisting option ...
    VERBOSE: [2020-06-01 08:38:50Z] Settings handler status to 'transitioning' 
    (C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.0.0\Status\0.status)
    VERBOSE: [2020-06-01 08:38:51Z] [VERBOSE] Perform operation 'Invoke CimMethod' with following parameters, ''methodName'
     = ApplyConfiguration,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = 
    root/Microsoft/Windows/DesiredStateConfiguration'.
    VERBOSE: [2020-06-01 08:38:51Z] [VERBOSE] An LCM method call arrived from computer adPDC with user sid S-1-5-18.
    

    关于azure - 在创建新的 AD 林和域期间重新启动后,具有 DSC 扩展的 ARM 模板失败并出现安全错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61985840/

    相关文章:

    powershell - Azure ARM 模板部署中的 DSC ConfigurationData 参数

    json - Azure API网关: Remove a attribute label from json

    powershell - 所需的状态配置 HTTPS 不起作用

    Powershell DSC,将 MOF 输出到不同的文件夹

    azure - Azure Pipelines 的并行化

    PowerShell DSC - 由于节点名称为空,因此跳过节点处理

    powershell - 如何应用多个DSC配置?

    sql-server - 如何将SSIS包部署到Azure?

    .net - Azure appSettings/connectionStrings 未转换我的 web.config

    azure - Spark独立集群不接受连接