dsccommunity / SqlServerDsc

This module contains DSC resources for deployment and configuration of Microsoft SQL Server.
MIT License
354 stars 225 forks source link

Cannot install Reporting Services on Windows 2012 Server R2 Core #512

Open Zuldan opened 7 years ago

Zuldan commented 7 years ago

Details of the scenario you try and problem that is occurring:

After trying to install Windows 2016 Reporting Services on Windows Core Server the following message is received. Using the exact same configuring on a Windows GUI Server, SSRS installs perfectly. I'm hoping it's something simple in the resource that can be adjusted but it may just be that Microsoft doesn't support SSRS on Windows Core Servers. If that's the case, maybe the README.md can be updated to reflect this (I would love to do my first PR).

VERBOSE: [LABSERVER01]: LCM:  [ Start  Resource ]  [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [LABSERVER01]: LCM:  [ Start  Test     ]  [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-45: Using path: \\labfs01.lab.corp\SQLServer2016Developer$\setup.exe
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-45: Features found: ''
VERBOSE: [LABSERVER01]: LCM:  [ End    Test     ]  [[xSQLServerSetup]SQLServerSetup]  in 0.5940 seconds.
VERBOSE: [LABSERVER01]: LCM:  [ Start  Set      ]  [[xSQLServerSetup]SQLServerSetup]
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-45: Using path: \\labfs01.lab.corp\SQLServer2016Developer$\setup.exe
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-45: Using path: \\labfs01.lab.corp\SQLServer2016Developer$\setup.exe
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-45: Starting setup using arguments: /ACTION="Install" /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /IACCEPTSQLSERVERLICENSETERMS="True" /RSSVCPA
SSWORD="********" /RSSVCACCOUNT="LAB\sqlserviceaccount" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /QUIET="True" /INSTANCENAME="MSSQLSERVER" /FEATURES=RS /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-56-46: Process matching path '\\labfs01.lab.corp\SQLServer2016Developer$\setup.exe' started in process ID 3032
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-59-32: Using path: \\labfs01.lab.corp\SQLServer2016Developer$\setup.exe
VERBOSE: [LABSERVER01]:                            [[xSQLServerSetup]SQLServerSetup] 2017-04-19_13-59-32: Features found: ''
VERBOSE: [LABSERVER01]: LCM:  [ End    Set      ]  [[xSQLServerSetup]SQLServerSetup]  in 166.9560 seconds.
Invoke-CimMethod : PowerShell DSC resource MSFT_xSQLServerSetup  failed to execute Set-TargetResource functionality with error message: Test-TargetResource returned false after calling set. 
At C:\LabDSC\SQLSSRS.ps1:20 char:5
+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand
    + PSComputerName        : LABSERVER01

VERBOSE: [LABSERVER01]:                            [] Consistency check completed.
Invoke-CimMethod : One or more partial configurations failed to apply. No configuration could be created. 
At C:\LabDSC\SQLSSRS.ps1:20 char:5
+     Invoke-CimMethod -CimSession $ServerName -Name PerformRequiredCon ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (root/Microsoft/...gurationManager:String) [Invoke-CimMethod], CimException
    + FullyQualifiedErrorId : MI RESULT 6,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand
    + PSComputerName        : LABSERVER01

The DSC configuration that is using the resource (as detailed as possible):

xSQLServerSetup SQLServerSetup
{
    PsDscRunAsCredential = $Credential            
    SourcePath           = $Node.SQLSourcePath
    SetupCredential      = $Credential
    InstanceName         = $Node.SQLInstanceName
    Features             = 'RS'
    SQLSysAdminAccounts  = $Node.SQLSysAdminAccounts            
    InstallSharedDir     = 'C:\Program Files\Microsoft SQL Server'
    InstallSharedWOWDir  = 'C:\Program Files (x86)\Microsoft SQL Server'
    InstanceDir          = 'C:\Program Files\Microsoft SQL Server'
    SQLSvcAccount        = $Credential
    RSSvcAccount         = $Credential
    ForceReboot          = $True   
}

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:

Server: Windows 2012 R2 (Update) SQL Server: 2016 SP1 CU2 Powershell: 5.1

Version of the DSC module you're using, or 'dev' if you're using current dev branch:

dev as of today

johlju commented 7 years ago

It is a problem that we can't see the error message that setup.exe fails with. :/ I have submitted an issue for that. Hope that can be solved.

Anyway, could you runt the following manually on the server from prompt and see what error message it fails with, if any (maybe it installs fine, then it is definitely a problem with the resource). Change to the correct password (and account if you changed when posting). You could also do a test and remove /QUIET="True".

setup.exe /QUIET="True" /ACTION="Install" /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /IACCEPTSQLSERVERLICENSETERMS="True" /RSSVCPASSWORD="********" /RSSVCACCOUNT="LAB\sqlserviceaccount" /INSTALLSHAREDWOWDIR="C:\Program Files (x86)\Microsoft SQL Server" /INSTANCENAME="MSSQLSERVER" /FEATURES=RS /INSTALLSHAREDDIR="C:\Program Files\Microsoft SQL Server"
johlju commented 7 years ago

And you are more than welcome to send in a PR to fix anything that needs fixing. 😄

johlju commented 7 years ago

Listed here as not supported on Server Core.

https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-on-server-core

johlju commented 7 years ago

The test above come to the same conclusion I gather? I so you are more than welcome to update the README.md.

Zuldan commented 7 years ago

Doh! I should have checked that doco. Thanks for finding that. Let me knock up a PR. Should get it done within the next few days.

johlju commented 7 years ago

Awesome! Looking forward to your PR. I labeled this on as 'In progress'.

johlju commented 6 years ago

@Zuldan Did you got around to making a fix for this? I don't think I have seen a PR? If you don't have time, then let me know and I bump this back down to 'Help wanted'. 😄

Zuldan commented 6 years ago

@johlju no I haven't sorry! Please kindly revert the status to Help Wanted.

johlju commented 6 years ago

@Zuldan No worries! Labeled as 'Help Wanted' now.