0

I am using Vagrant to provision a Windows 10 VM with SQL Server 2016 via PowerShell and I suddenly started getting exit code 3010 (computer restart required) after many successful installs without it.

Why would it suddenly start happening? Doesn't Vagrant always use a brand new copy of my VM every time so that it is consistent?

  • Vagrant 2.2.4
  • Box: StefanScherer/windows_10 (Windows 10 with nothing on it)
  • SQL Server 2016 install EXE sourced from the ISO from Microsoft website
  • host machine is MacBook Pro 2018 with 10.14.3 Mojave using iTerm2

I've already had probably 50 successful installs of SQL Server on the VM. This has just started happening. Each successful install is after I vagrant destroy -f and vagrant up.

Vagrant file (simplified)

config.vm.box = "StefanScherer/windows_10"

config.vm.provision :shell, path: "./scripts/install-sql-server.ps1", :args => sql_server_version != "" ? "-version " + sql_server_version : "", privileged: true

install-sql-server.ps1 (simplified)

$SETUP_EXE_PATH = "C:\temp-dir\2016\SQLServer2016Media\Developer_ENU\SETUP.exe"
$CONFIG_FILE_PATH = "C:\vagrant\config\sql-server\2016\ConfigurationFile.ini"

& $SETUP_EXE_PATH /ConfigurationFile=$CONFIG_FILE_PATH /SkipRules=RebootRequiredCheck
CheckLastExitCode

ConfigurationFile.ini

[OPTIONS]
ACTION="Install"
QUIET="True"
FEATURES=SQL,Tools
SUPPRESSPRIVACYSTATEMENTNOTICE="True"
IACCEPTSQLSERVERLICENSETERMS="True"
UpdateEnabled="False"
USEMICROSOFTUPDATE="False"
INSTANCENAME="VAGRANT"
SQLSYSADMINACCOUNTS="BUILTIN\ADMINISTRATORS"
SECURITYMODE="SQL"
SAPWD="password@123"
TCPENABLED="1"
BROWSERSVCSTARTUPTYPE="Automatic"

Vagrant running the powershell script:

==> default: Running provisioner: shell...
    default: Running: ./scripts/install-sql-server.ps1 as c:\tmp\vagrant-shell.ps1
    default: ==========> Installing Microsoft SQL Server 2017...
    default: Microsoft .NET Framework CasPol 4.7.3190.0
    default: for Microsoft .NET Framework version 4.7.3190.0
    default: Copyright (C) Microsoft Corporation.  All rights reserved.
    default: WARNING: The .NET Framework does not apply CAS policy by default. Any settings
    default: shown or modified by CasPol will only affect applications that opt into using
    default: CAS policy.
    default: Please see http://go.microsoft.com/fwlink/?LinkId=131738 for more information.
    default: Success
    default: Microsoft .NET Framework CasPol 4.7.3190.0
    default: for Microsoft .NET Framework version 4.7.3190.0
    default: Copyright (C) Microsoft Corporation.  All rights reserved.
    default: WARNING: The .NET Framework does not apply CAS policy by default. Any settings
    default: shown or modified by CasPol will only affect applications that opt into using
    default: CAS policy.
    default: Please see http://go.microsoft.com/fwlink/?LinkId=131738 for more information.
    default: Success
    default: SQL Server 2017 transmits information about your installation experience, as well as other usage and performance data, to Microsoft to help improve the product. To learn more about SQL Server 2017 data processing and privacy controls, please see the Privacy Statement.
default: One or more affected files have operations pending.
default: You should restart your computer to complete this process.



The following error occurred:
No features were installed during the setup execution. The requested features may already be installed. Please review the summary.txt log for further details.

Error result: -2068643838
Result facility code: 1203
Result error code: 2

Please review the summary.txt log for further details
Microsoft (R) SQL Server 2016 13.00.4001.00

Copyright (c) 2016 Microsoft.  All rights reserved.

summary.txt

Overall summary:
  Final result:                  Passed but reboot required, see logs for details
  Exit code (Decimal):           -2067919934
  Exit facility code:            1214
  Exit error code:               3010
  Exit message:                  A computer restart is required. You must restart this computer before installing SQL Server.
  Start time:                    2019-05-23 23:39:22
  End time:                      2019-05-23 23:39:26
  Requested action:              Install

Machine Properties:
  Machine name:                  VAGRANT-10
  Machine processor count:       2
  OS version:                    Microsoft Windows 10 Enterprise Evaluation (10.0.17763)
  OS service pack:               
  OS region:                     United States
  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 2016 
  ProductName:                   SQL Server 2016
  Type:                          RTM
  Version:                       13
  Installation location:         C:\sql-server-setup-temp\2016\SQLServer2016Media\Developer_ENU\x64\setup\
  Installation edition:          Developer

  Slipstream:                    True

Product Update Status:
  User selected not to include product updates.

User Input Settings:
  ACTION:                        Install
  ADDCURRENTUSERASSQLADMIN:      false
  AGTSVCACCOUNT:                 <empty>
  AGTSVCPASSWORD:                <empty>
  AGTSVCSTARTUPTYPE:             Manual
  ASBACKUPDIR:                   Backup
  ASCOLLATION:                   Latin1_General_CI_AS
  ASCONFIGDIR:                   Config
  ASDATADIR:                     Data
  ASLOGDIR:                      Log
  ASPROVIDERMSOLAP:              1
  ASSERVERMODE:                  MULTIDIMENSIONAL
  ASSVCACCOUNT:                  <empty>
  ASSVCPASSWORD:                 <empty>
  ASSVCSTARTUPTYPE:              Automatic
  ASSYSADMINACCOUNTS:            <empty>
  ASTELSVCACCT:                  <empty>
  ASTELSVCPASSWORD:              <empty>
  ASTELSVCSTARTUPTYPE:           0
  ASTEMPDIR:                     Temp
  BROWSERSVCSTARTUPTYPE:         Automatic
  CLTCTLRNAME:                   <empty>
  CLTRESULTDIR:                  <empty>
  CLTSTARTUPTYPE:                0
  CLTSVCACCOUNT:                 <empty>
  CLTSVCPASSWORD:                <empty>
  CLTWORKINGDIR:                 <empty>
  COMMFABRICENCRYPTION:          0
  COMMFABRICNETWORKLEVEL:        0
  COMMFABRICPORT:                0
  CONFIGURATIONFILE:             C:\vagrant\config\sql-server\2016\ConfigurationFile.ini
  CTLRSTARTUPTYPE:               0
  CTLRSVCACCOUNT:                <empty>
  CTLRSVCPASSWORD:               <empty>
  CTLRUSERS:                     <empty>
  ENABLERANU:                    false
  ENU:                           true
  EXTSVCACCOUNT:                 <empty>
  EXTSVCPASSWORD:                <empty>
  FEATURES:                      SQL, TOOLS
  FILESTREAMLEVEL:               0
  FILESTREAMSHARENAME:           <empty>
  FTSVCACCOUNT:                  <empty>
  FTSVCPASSWORD:                 <empty>
  HELP:                          false
  IACCEPTROPENLICENSETERMS:      false
  IACCEPTSQLSERVERLICENSETERMS:  true
  INDICATEPROGRESS:              false
  INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
  INSTALLSHAREDWOWDIR:           C:\Program Files (x86)\Microsoft SQL Server\
  INSTALLSQLDATADIR:             <empty>
  INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
  INSTANCEID:                    <empty>
  INSTANCENAME:                  VAGRANT
  ISSVCACCOUNT:                  NT AUTHORITY\Network Service
  ISSVCPASSWORD:                 <empty>
  ISSVCSTARTUPTYPE:              Automatic
  ISTELSVCACCT:                  <empty>
  ISTELSVCPASSWORD:              <empty>
  ISTELSVCSTARTUPTYPE:           0
  MATRIXCMBRICKCOMMPORT:         0
  MATRIXCMSERVERNAME:            <empty>
  MATRIXNAME:                    <empty>
  MRCACHEDIRECTORY:              
  NPENABLED:                     0
  PBDMSSVCACCOUNT:               <empty>
  PBDMSSVCPASSWORD:              <empty>
  PBDMSSVCSTARTUPTYPE:           0
  PBENGSVCACCOUNT:               <empty>
  PBENGSVCPASSWORD:              <empty>
  PBENGSVCSTARTUPTYPE:           0
  PBPORTRANGE:                   <empty>
  PBSCALEOUT:                    false
  PID:                           *****
  QUIET:                         true
  QUIETSIMPLE:                   false
  ROLE:                          
  RSINSTALLMODE:                 DefaultNativeMode
  RSSHPINSTALLMODE:              DefaultSharePointMode
  RSSVCACCOUNT:                  <empty>
  RSSVCPASSWORD:                 <empty>
  RSSVCSTARTUPTYPE:              Automatic
  SAPWD:                         *****
  SECURITYMODE:                  SQL
  SQLBACKUPDIR:                  <empty>
  SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
  SQLSVCACCOUNT:                 <empty>
  SQLSVCINSTANTFILEINIT:         false
  SQLSVCPASSWORD:                <empty>
  SQLSVCSTARTUPTYPE:             Automatic
  SQLSYSADMINACCOUNTS:           BUILTIN\ADMINISTRATORS
  SQLTELSVCACCT:                 <empty>
  SQLTELSVCPASSWORD:             <empty>
  SQLTELSVCSTARTUPTYPE:          0
  SQLTEMPDBDIR:                  <empty>
  SQLTEMPDBFILECOUNT:            0
  SQLTEMPDBFILEGROWTH:           -1
  SQLTEMPDBFILESIZE:             -1
  SQLTEMPDBLOGDIR:               <empty>
  SQLTEMPDBLOGFILEGROWTH:        -1
  SQLTEMPDBLOGFILESIZE:          -1
  SQLUSERDBDIR:                  <empty>
  SQLUSERDBLOGDIR:               <empty>
  SUPPRESSPRIVACYSTATEMENTNOTICE: true
  TCPENABLED:                    1
  UIMODE:                        Normal
  UpdateEnabled:                 false
  UpdateSource:                  Slipstream
  USEMICROSOFTUPDATE:            false
  X86:                           false

  Configuration file:            C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\20190523_233920\ConfigurationFile.ini

Rules with failures:

Global rules:

Scenario specific rules:

Rules report file:               C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\20190523_233920\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: Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngineRuleFailureException
    Message: 
        A computer restart is required. You must restart this computer before installing SQL Server.
    HResult : 0x84be0bc2
        FacilityCode : 1214 (4be)
        ErrorCode : 3010 (0bc2)
    Data: 
      SQL.Setup.FailureCategory = RuleViolationFailure
      DisableWatson = true
    Stack: 
        at Microsoft.SqlServer.Configuration.RulesEngineExtension.RunRulesAction.ExecuteAction(String actionId)
        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.<>c__DisplayClasse.<ExecuteActionWithRetryHelper>b__b()
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(ActionWorker workerDelegate)
jared_hexagon
  • 175
  • 1
  • 1
  • 10
  • The error claims SQL Server is already installed: `The requested features may already be installed. Please review the summary.txt`. Is there existing an installation? Does summary.txt contain anything of use? – vonPryz May 24 '19 at 06:05
  • @vonPryz I've added `summary.txt` to the question. There is no existing installation - I always start with a base Windows 10 VM. The summary doesn't contain any new info. – jared_hexagon May 24 '19 at 06:47
  • One thing I have noticed is every time I `vagrant up` after `vagrant destroy -f` (and even reinstalling vagrant and virtualbox) I see the Windows 10 evaluation days remaining not resetting. Is that normal? I thought Vagrant made a copy of the base VM image each time. Could it be persisting stuff? – jared_hexagon May 24 '19 at 06:51
  • There's a [pending reboot](https://stackoverflow.com/a/47869761/503046) that prevents SQL Server installation, according to the log: `A computer restart is required. You must restart this computer before installing SQL Server.`. Does a reboot fix the issue? – vonPryz May 24 '19 at 07:34
  • @vonPryz Yes it does. – jared_hexagon May 24 '19 at 07:38
  • @vonPryz Actually it doesn't. The "issue" is that it should never require that reboot as I am provisioning a base windows 10 box that I have already provisioned probably 50 times successfully without the reboot. – jared_hexagon May 27 '19 at 01:11
  • Check the registry keys for pending reboot root cause. Maybe there's a Windows update that's been snoozed and it's triggering now. – vonPryz May 27 '19 at 06:13

0 Answers0