sql-server - 退出代码 3010 使用 Vagrant 安装 SQL Server
问题描述
我正在使用 Vagrant 通过 PowerShell 使用 SQL Server 2016 配置 Windows 10 VM,在没有它的情况下多次成功安装后,我突然开始收到退出代码 3010(需要重新启动计算机)。
为什么会突然开始发生?Vagrant 不是每次都使用我的 VM 的全新副本以保持一致吗?
- 流浪者 2.2.4
- 盒子:StefanScherer/windows_10(Windows 10 上面什么都没有)
- SQL Server 2016 安装来自 Microsoft 网站 ISO 的 EXE
- 主机是 MacBook Pro 2018 和 10.14.3 Mojave,使用 iTerm2
我已经在 VM 上成功安装了大约 50 次 SQL Server。这才刚刚开始发生。每次成功安装都是在 Ivagrant destroy -f
和vagrant up
.
Vagrant 文件(简体)
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
安装-sql-server.ps1(简化版)
$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
配置文件.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 运行 powershell 脚本:
==> 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.
摘要.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)
解决方案
推荐阅读
- laravel - 图片不会出现在 voyager laravel 中
- html - 网站资产在桌面版上“放大”,但不是移动版
- bash - shell脚本中特定exit_code的异常处理?
- ios - 如何在类方法中执行 Core Data NSFetchRequest?
- javascript - 当有人点击浏览器的后退按钮做出反应时,我想重定向到一个组件?
- sql - 父子SQL查询
- google-sheets-formula - 添加列后自动更新公式
- javascript - 如何在热图图层中设置消散
- mysql - 在 MySQL ib_buffer_pool 和 ibtmp1 迁移系统表空间时也移动了 ibdata 文件
- node.js - multer 和 router.post() 的问题。无法读取属性“任何”