【发布时间】:2022-01-18 05:04:22
【问题描述】:
全部,
我正在尝试自动化基础架构,其中我使用 Azure DevOps CI/CD 管道部署 VM,并使用 DSC 使用模块 XSCOM 1.3.3.0 配置/安装 SCOM。根据我的同事的说法,以下代码适用于 VMWare 虚拟机。
问题: 对以下错误或以自动化方式在 Azure 机器上安装 SCOM 的任何其他方法有任何想法吗?
DSC 代码:
xSCOMManagementServerSetup "OMMS"
{
DependsOn = @('[Package]ODBCDriver13', '[Package]SQLClient11')
Ensure = "Present"
SourcePath = $SCM2016Path
SetupCredential = $AdminCreds
#ProductKey = $Node.SCM2016Key
ManagementGroupName = $MgmtGrp
InstallPath = $SCM2016InstallPath
FirstManagementServer = $false
ActionAccount = $OpsActionCredential
DASAccount = $OpsSDKCredential
DataReader = $OpsDRACredential
DataWriter = $OpsDWACredential
SqlServerInstance = $SCM2016DB
DatabaseSize = $DatabaseSize
DwSqlServerInstance = $SCM2016DWDB
DWDatabaseSize = $DWDatabaseSize
# UseMicrosoftUpdate =
}
xSCOMWebConsoleServerSetup "OMWC"
{
DependsOn = '[xSCOMManagementServerSetup]OMMS'
Ensure = "Present"
SourcePath = $SCM2016Path
SetupCredential = $AdminCreds
InstallPath = $SCM2016InstallPath
ManagementServer = $nodename
WebSiteName = "Default Web Site"
WebConsoleAuthorizationMode = "Mixed"
WebConsoleUseSSL = $false
}
xSCOMConsoleSetup "OMC"
{
DependsOn = '[xSCOMWebConsoleServerSetup]OMWC'
Ensure = "Present"
SourcePath = $SCM2016Path
InstallPath = $SCM2016InstallPath
SetupCredential = $AdminCreds
}
错误:
Job {94883009-5CFE-11EC-A811-002248041883} :
Message Set-TargetResouce failed
HResult -2146233087
StackTrack at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.ExecuteCommand(PowerShell powerShell, ResourceModuleInfo resInfo, String operationCmd, List`1 acceptedProperties, CimInstance nonResourcePropeties, CimInstance resourceConfiguration, LCMDebugMode debugMode, PSInvocationSettings pSInvocationSettings, UInt32& resultStatusHandle, Collection`1& result, ErrorRecord& errorRecord, PSModuleInfo localRunSpaceModuleInfo)
【问题讨论】:
标签: azure powershell azure-powershell dsc