在由 Vagrant 提供的 Windows Server 2008 R2 - Datacentre 核心(从vagrantbox.es下载)VM 上,我运行chef-solo
以测试我的食谱。windows_package
如果没有Win32APIError,我无法运行。
运行以下配方步骤:
windows_package ".NET 4.0" do
package_name "Microsoft .NET Framework 4 Extended"
source "http://download.microsoft.com/download/3/6/1/361DAE4E-E5B9-4824-B47F-6421A6C59227/dotNetFx40_Full_x86_x64_SC.exe"
options "/q"
installer_type :inno
action :install
end
产生以下错误:
Chef::Exceptions::Win32APIError: windows_package[.NET 4.0] (<my recipe> line 10) had an error:
Chef::Exceptions::Win32APIError: remote_file[C:/vagrant/cache/dotNetFx40_Full_x86_x64_SC.exe] (dynamically defined) had an error:
Chef::Exceptions::Win32APIError: Incorrect function.
get_named_security_info(C:/vagrant/cache/dotNetFx40_Full_x86_x64_SC.exe, SE_FILE_OBJECT, 7)
---- Begin Win32 API output ----
System Error Code: 1
System Error Message: Incorrect function.
---- End Win32 API output ----
安装文件已正确下载,我可以在厨师错误后从 VM 控制台手动运行它,所以我猜这是一些 Ruby/Chef 权限错误......
尝试安装Opscode SQL Server 配方会产生相同的get_named_security_info
错误。
知道有什么问题吗?
--
使用 Chef 版本 11.4.4-2