-
Notifications
You must be signed in to change notification settings - Fork 225
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
PowerShell DSC resource MSFT_xSQLServerSetup failed to execute Set-TargetResource functionality with error message: Test-TargetResource returned false after calling set. #88
Comments
Could you please show how your config looks like? |
Hi, This error usually means that one or more features listed in configuration was not detected by test method after setup has completed. I see that you are specified SQLENGINE,ADV_SSMS I think i had similar issue a while back, so i'm specifying both in all my scripts, not sure if this is still needed thou. You can also troubleshoot by executing Get-DscConfiguration on target machine, this should output what features are detected. |
I ran Get-DSCConfiguration Here is the result i got: PS C:\Program Files\WindowsPowerShell\Modules> Get-dscConfiguration ConfigurationName : SqlServerSetup Result : True TestScript : PSComputerName : ConfigurationName : SqlServerSetup ConfigurationName : SqlServerSetup ConfigurationName : SqlServerSetup |
so SSMS failed to install, you should look at setup logs. Maybe you are missing a prerequisite. Have you tried with specifying SSMS and ADV_SSMS features? |
I added the setup long at the bottom of the initial post. Get Outlook for Android On Fri, Jul 29, 2016 at 1:27 PM +0100, "Arturas Kuznecovas" notifications@github.com wrote: so SSMS failed to install, you should look at setup logs. Maybe you are missing a prerequisite. Have you tried with specifying SSMS and ADV_SSMS features? You are receiving this because you authored the thread. |
Yes i did. i added it as shown in the below result: VERBOSE: [LONSQL60A]: LCM: [ End Set ] VERBOSE: Operation 'Invoke CimMethod' complete. |
I think I have seen this error before. I can be wrong, but I think it was when SourceCredential was not set. When SourceCredential is set, it does RoboCopy to local disk before starting setup. If SourceCredential is not set then it tries to start the setup from the SourcePath+SourceFolder, and accessing it over UNC, and at that point I think I got CIMSession error. Can you verify if you are using SourceCredential or not? So we can rule that out. This is how my config looks like. I used it yesterday with the latest dev-branch without any problems.
|
Well, everything was copied locally and and the ISO files ae mounted on the server and filled in the administrator's credential, the share path's credential including the SA account credential. Not sure why this is not working. |
And as @Arturas-K say maybe you are missing a prereq? I do the following before installing SQL, just to make sure they are there.
Alos, if setup process is starting, as @Arturas-K say, check the SQL setup logs, because then it might be something SQL specific error (outside of DSC). |
I've just realised that some of the SQL features will not work and will throw the error message above. |
Yes you are correct not all features are detected by Get method, so it will be installed but then not detected and will throw error that test method failed after set. But one correction, Replication feature does work, i have fixed that in PR #20 and i'm using it to build my devtest environments so it is definitely working on SQL2008R2 and SQL2012 Regards |
OK. I've never used this on SQL server 2008,R2 and 2012. All my testing has been on SQL 2014 so far. ----- Reply message ----- Yes you are correct not all features are detected by Get method, so it will be installed but then not detected and will throw error that test method failed after set. But one correction, Replication feature does work, i have fixed that in PR #20 and i'm using it to build my devtest environments so it is definitely working on SQL2008R2 and SQL2012 Regards You are receiving this because you authored the thread. |
I'm finding it difficult to install a default instance. Also, how do i set up dedicated SQL service accounts based on IS,AS,RS,DE,FT on each environment? Not sure if i'll have to leave the instance name empty when installing a default instance or not. Error message below: VERBOSE: [LONSQL60B]: [[xSQLServerSetup]SqlInstaller] Path: F:\setup.exe VERBOSE: [LONSQL60B]: LCM: [ End Test ] [[xSQLServerSetup]SqlInstaller] in 61.3920 seconds. VERBOSE: [LONSQL60B]: LCM: [ Start Resource ] [[WindowsFeature]WindowsPowerShell50] |
@bodunjo Sorry for taking so long to answer. You need to set the instance name to You need to see each parameter to a PSCredential object, like For AS use parameter Let me know if you need help with anything else. 😄 |
@bodunjo I'm closing this issue since we have not heard anything more from you in a while. Please feel free to open up the issue again if you need further help. |
@johlju thanks a million for getting back to me. I've just had the time to test again. I did what you recommended above to try SQL 2016 installation. The install went ok but the service accounts are not applied still. it's showing as SQLAgent$BAUTEST3 intead of using the designated service accounts. Here is my script:
and here is the error message:
|
Hello again @bodunjo! Glad to here you gotten further. Parameter If you do the following I think that it should work. 1. Un-comment this row in the
2. Rename this Configuration parameter on this row From
To
3. And change this row for the xSQLServerSetup resource. From
To
|
@johlju Thanks a million. This worked. I had to go through all the available params in the .psm1 files of the DSCResources of the SQLServerSetup. |
@bodunjo The SA account is always disabled when using Windows Authentication mode. To get the SA account enabled, you will need to use Mixed Authentication Mode. |
@randomnote1 Thanks. I never realised that SecurityMode property is available. I've just tested and it works. |
Hi,
xSQLServerSetup 'InstallDefaultInstance' Thanks! |
@MagicMarty From what I've seen, this typically means the setup finished, but not successfully. Have a look at the sql install log which can found at a path similar to "C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\Summary.txt". (this one is for sql 2016) |
I'm trying to run SQL 2014c install using the xSQLserverSetup module with the following error messages:
Mode LastWriteTime Length Name
-a---- 29/07/2016 11:51 6248 LONSQL60A.mof
-a---- 29/07/2016 11:51 1122 LONSQL60A.meta.mof
PS C:\Program Files\WindowsPowerShell\Modules> Start-DscConfiguration -Path C:\Temp\SqlServerSetup\ -credential (Get-credential) -Verbose -Wait -Force
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsof
t/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer CONTOSO.COM with user sid S-1-5-21-3798882980-2146746437-3985048140-44958.
VERBOSE: [CONTOSO.COM]: LCM: [ Start Set ]
VERBOSE: [CONTOSO.COM]: [DSCEngine] Importing the module C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_ScriptResour
ce\MSFT_ScriptResource.psm1 in force mode.
VERBOSE: [CONTOSO.COM]: [DSCEngine] Importing the module C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_RoleResource
\MSFT_RoleResource.psm1 in force mode.
VERBOSE: [CONTOSO.COM]: [DSCEngine] Importing the module C:\Program Files\WindowsPowerShell\Modules\xSQLServer\1.5.0.0\DscResources\MSFT_xSQLServerSetup\MSFT_xSQLServ
erSetup.psm1 in force mode.
VERBOSE: [CONTOSO.COM]: LCM: [ Start Resource ] [[Script]DisableFirewall]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Test ] [[Script]DisableFirewall]
VERBOSE: [CONTOSO.COM]: [[Script]DisableFirewall] Importing the module MSFT_ScriptResource in force mode.
VERBOSE: [CONTOSO.COM]: LCM: [ End Test ] [[Script]DisableFirewall] in 1.2350 seconds.
VERBOSE: [CONTOSO.COM]: LCM: [ Skip Set ] [[Script]DisableFirewall]
VERBOSE: [CONTOSO.COM]: LCM: [ End Resource ] [[Script]DisableFirewall]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Resource ] [[File]DSCResourceFolder]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Test ] [[File]DSCResourceFolder]
VERBOSE: [CONTOSO.COM]: [[File]DSCResourceFolder] The network name cannot be found.
VERBOSE: [CONTOSO.COM]: [[File]DSCResourceFolder] The related file/directory is: \CONTOSO.COM\Modules.
VERBOSE: [CONTOSO.COM]: [[File]DSCResourceFolder] Building file list from cache.
VERBOSE: [CONTOSO.COM]: [[File]DSCResourceFolder] The destination object was found and no action is required.
VERBOSE: [CONTOSO.COM]: LCM: [ End Test ] [[File]DSCResourceFolder] in 7.6720 seconds.
VERBOSE: [CONTOSO.COM]: LCM: [ Skip Set ] [[File]DSCResourceFolder]
VERBOSE: [CONTOSO.COM]: LCM: [ End Resource ] [[File]DSCResourceFolder]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Resource ] [[WindowsFeature]NTFranmeworkcore]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Test ] [[WindowsFeature]NTFranmeworkcore]
VERBOSE: [CONTOSO.COM]: [[WindowsFeature]NTFranmeworkcore] Importing the module MSFT_RoleResource in force mode.
VERBOSE: [CONTOSO.COM]: [[WindowsFeature]NTFranmeworkcore] The operation 'Get-WindowsFeature' started: Net-Framework-Core
VERBOSE: [CONTOSO.COM]: [[WindowsFeature]NTFranmeworkcore] The operation 'Get-WindowsFeature' succeeded: NET-Framework-Core
VERBOSE: [CONTOSO.COM]: LCM: [ End Test ] [[WindowsFeature]NTFranmeworkcore] in 0.6710 seconds.
VERBOSE: [CONTOSO.COM]: LCM: [ Skip Set ] [[WindowsFeature]NTFranmeworkcore]
VERBOSE: [CONTOSO.COM]: LCM: [ End Resource ] [[WindowsFeature]NTFranmeworkcore]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Resource ] [[xSQLServerSetup]SqlInstaller]
VERBOSE: [CONTOSO.COM]: LCM: [ Start Test ] [[xSQLServerSetup]SqlInstaller]
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing the module MSFT_xSQLServerSetup in force mode.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\xSQLServer\1.5.0.0\xPDT.psm1'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'GetxPDTVariable'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'NetUse'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'ResolvePath'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'StartWin32Process'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Path: Z:\setup.exe
VERBOSE: [CONTOSO.COM]: LCM: [ End Test ] [[xSQLServerSetup]SqlInstaller] in 1.5790 seconds.
VERBOSE: [CONTOSO.COM]: LCM: [ Start Set ] [[xSQLServerSetup]SqlInstaller]
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing the module MSFT_xSQLServerSetup in force mode.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\xSQLServer\1.5.0.0\xPDT.psm1'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'GetxPDTVariable'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'NetUse'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'ResolvePath'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'StartWin32Process'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Path: Z:\setup.exe
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'GetxPDTVariable'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'NetUse'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'ResolvePath'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'StartWin32Process'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Path: Z:\setup.exe
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Arguments: /Quiet="True" /IAcceptSQLServerLicenseTerms="True" /Action="Install" /AGTSVCSTARTUPTYPE=Automatic /
InstanceName="MSSQLSERVER" /Features="SQLENGINE,ADV_SSMS" /SQLSysAdminAccounts="installer"
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Process matching path 'Z:\setup.exe' started in process ID 1472
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'GetxPDTVariable'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'NetUse'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'ResolvePath'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'StartWin32Process'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Importing function 'WaitForWin32ProcessEnd'.
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Path: Z:\setup.exe
VERBOSE: [CONTOSO.COM]: [[xSQLServerSetup]SqlInstaller] Test-TargetResource returned false after calling set. | ErrorType: MSFT_xSQLServerSetup.TestFailedAfterSet
VERBOSE: [CONTOSO.COM]: LCM: [ End Set ] [[xSQLServerSetup]SqlInstaller] in 15.3120 seconds.
PowerShell DSC resource MSFT_xSQLServerSetup failed to execute Set-TargetResource functionality with error message: Test-TargetResource returned false after calling set.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : CONTOSO.COM
VERBOSE: [CONTOSO.COM]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : CONTOSO.COM
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 27.741 seconds
PS C:\Program Files\WindowsPowerShell\Modules>
Here is the message summary:
IOverall summary:
Final result: Failed: see details below
Exit code (Decimal): -2147024895
Exit facility code: 7
Exit error code: 1
Exit message: Incorrect function.
Start time: 2016-07-29 11:58:02
End time: 2016-07-29 11:58:09
Requested action: Install
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.2000.8&EvtType=0x60797DC7%400xAC9299FD&EvtType=0x60797DC7%400xAC9299FD
Machine Properties:
Machine name: CONTOSO.COM
Machine processor count: 4
OS version: Windows Server 2012
OS service pack:
OS region: United Kingdom
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered Configured
Package properties:
Description: Microsoft SQL Server 2014
ProductName: SQL Server 2014
Type: RTM
Version: 12
SPLevel: 0
Installation location: Z:\x64\setup
Installation edition: Enterprise
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: false
AGTSVCACCOUNT:
AGTSVCPASSWORD:
AGTSVCSTARTUPTYPE: Automatic
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT:
ASSVCPASSWORD:
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS:
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CLTCTLRNAME:
CLTRESULTDIR:
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT:
CLTSVCPASSWORD:
CLTWORKINGDIR:
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE:
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT:
CTLRSVCPASSWORD:
CTLRUSERS:
ENABLERANU: false
ENU: true
ERRORREPORTING: false
FEATURES: SQLENGINE, ADV_SSMS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME:
FTSVCACCOUNT:
FTSVCPASSWORD:
HELP: false
IACCEPTSQLSERVERLICENSETERMS: true
INDICATEPROGRESS: false
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server
INSTALLSQLDATADIR:
INSTANCEDIR: C:\Program Files\Microsoft SQL Server
INSTANCEID:
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD:
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME:
MATRIXNAME:
NPENABLED: 0
PID: *****
QUIET: true
QUIETSIMPLE: false
ROLE:
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: DefaultSharePointMode
RSSVCACCOUNT:
RSSVCPASSWORD:
RSSVCSTARTUPTYPE: Automatic
SAPWD:
SECURITYMODE:
SQLBACKUPDIR:
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT:
SQLSVCPASSWORD:
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: installer
SQLTEMPDBDIR:
SQLTEMPDBLOGDIR:
SQLUSERDBDIR:
SQLUSERDBLOGDIR:
SQMREPORTING: false
TCPENABLED: 0
UIMODE: Normal
UpdateEnabled: true
UpdateSource: MU
USEMICROSOFTUPDATE: false
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20160729_115801\ConfigurationFile.ini
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20160729_115801\SystemConfigurationCheck_Report.htm
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: System.IO.IOException
Message:
Incorrect function.
The text was updated successfully, but these errors were encountered: