2

我想让 Vagrant 启动 Windows Server 2012 R2 机器并安装SQL Server 2014 Express作为配置的一部分。我已经在机器上安装了巧克力,并让 vagrant 运行这样的 powershell 文件:

config.vm.provision "shell", path: "./dev-tools.ps1"

choco install mssqlserver2014express -y在那个powershell脚本中很简单。它运行脚本,看起来 SQL 安装程序不喜欢在没有显示的情况下运行:

==> default: The following error occurred:
==> default:
==> default: Showing a modal dialog box or form when the application is 
not running in UserInteractive mode is not a valid operation. Specify 
the ServiceNotification or DefaultDesktopOnly style to display a
notification from a service application.
==> default:
==> default: Error result: -2146233079
==> default: Result facility code: 19
==> default: Result error code: 5385    

作为配置 Windows 框的一部分,有没有人处理过这样的事情?

4

3 回答 3

1

In the meantime, you might try turning on the GUI. Windows Server 2012 R2 still has a GUI, by default, right? I assume you're using the VirtualBox provider since you didn't specify otherwise.

Add this to your Vagrantfile

config.vm.provider "virtualbox" do |v|
  v.gui = true
end

http://docs.vagrantup.com/v2/virtualbox/configuration.html

于 2015-02-23T21:27:35.370 回答
1

听起来您可能想回到包的维护者那里,询问他们是否可以使 sql server 安装程序完全静默。与他们分享此堆栈溢出帖子。

于 2015-02-19T12:20:06.773 回答
1

您可以尝试适应(或只是使用)https://github.com/leezu/vagrant-mssql-express/

于 2015-05-18T12:58:58.640 回答