mwrock / packer-templates

Templates for creating vagrant boxes
Other
535 stars 250 forks source link

Powershell Cmdlet failed: The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error #96

Open johnrizzo1 opened 6 years ago

johnrizzo1 commented 6 years ago

I get this error at the end of the process.

hyperv-iso: Recipe: packer-templates::enable_file_sharing
hyperv-iso: * dsc_resource[File sharing firewall rule (SMB-In)] action run
hyperv-iso:
hyperv-iso: ================================================================================
hyperv-iso: Error executing action `run` on resource 'dsc_resource[File sharing firewall rule (SMB-In)]'
hyperv-iso: ================================================================================
hyperv-iso:
hyperv-iso: Chef::Exceptions::PowershellCmdletException
hyperv-iso: -------------------------------------------
hyperv-iso: Powershell Cmdlet failed: The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error:
hyperv-iso: HRESULT 0x80041033
hyperv-iso: + CategoryInfo          : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException
hyperv-iso: + FullyQualifiedErrorId : HRESULT 0x80041033
hyperv-iso: + PSComputerName        : localhost
hyperv-iso:
hyperv-iso:
hyperv-iso: Resource Declaration:
hyperv-iso: ---------------------
hyperv-iso: # In c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/enable_file_sharing.rb
hyperv-iso:
hyperv-iso: 1: dsc_resource "File sharing firewall rule (SMB-In)" do
hyperv-iso: 2:   resource :xfirewall
hyperv-iso: 3:   property :name, "File and Printer Sharing (SMB-In)"
hyperv-iso: 4:   property :ensure, "Present"
hyperv-iso: 5:   property :enabled, "True"
hyperv-iso: 6: end
hyperv-iso: 7:
hyperv-iso:
hyperv-iso: Compiled Resource:
hyperv-iso: ------------------
hyperv-iso: # Declared in c:/windows/temp/packer-chef-solo/local-mode-cache/cache/cookbooks/packer-templates/recipes/enable_file_sharing.rb:1:in `from_file'
hyperv-iso:
hyperv-iso: dsc_resource("File sharing firewall rule (SMB-In)") do
hyperv-iso: action [:run]
hyperv-iso: default_guard_interpreter :default
hyperv-iso: properties {name=>"File and Printer Sharing (SMB-In)", ensure=>"Present", enabled=>"True"}
hyperv-iso: resource :xfirewall
hyperv-iso: reboot_action :nothing
hyperv-iso: declared_type :dsc_resource
hyperv-iso: cookbook_name "packer-templates"
hyperv-iso: recipe_name "enable_file_sharing"
hyperv-iso: end
hyperv-iso:
hyperv-iso: System Info:
hyperv-iso: ------------
hyperv-iso: chef_version=13.3.42
hyperv-iso: platform=windows
hyperv-iso: platform_version=10.0.14393
hyperv-iso: ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
hyperv-iso: program_name=c:/opscode/chef/bin/chef-solo
hyperv-iso: executable=c:/opscode/chef/bin/chef-solo
hyperv-iso:
hyperv-iso:
hyperv-iso: Running handlers:
hyperv-iso: [2017-08-31T18:45:10+00:00] ERROR: Running exception handlers
hyperv-iso: Running handlers complete
hyperv-iso: [2017-08-31T18:45:10+00:00] ERROR: Exception handlers complete
hyperv-iso: Chef Client failed. 0 resources updated in 01 minutes 06 seconds
hyperv-iso: [2017-08-31T18:45:10+00:00] FATAL: Stacktrace dumped to c:/windows/temp/packer-chef-solo/local-mode-cache/cache/chef-stacktrace.out
hyperv-iso: [2017-08-31T18:45:10+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
hyperv-iso: [2017-08-31T18:45:10+00:00] FATAL: Chef::Exceptions::PowershellCmdletException: dsc_resource[File sharing firewall rule (SMB-In)] (packer-templates::enable_file_sharing line 1) had an error: Chef::Exceptions::PowershellCmdletException: Powershell Cmdlet failed: The WS-Management service cannot process the request. The WMI service or the WMI provider returned an unknown error:
hyperv-iso: HRESULT 0x80041033
hyperv-iso: + CategoryInfo          : ResourceUnavailable: (root/Microsoft/...gurationManager:String) [], CimException
hyperv-iso: + FullyQualifiedErrorId : HRESULT 0x80041033
hyperv-iso: + PSComputerName        : localhost
hyperv-iso:
hyperv-iso:

==> hyperv-iso: Cleanup floppy drive... ==> hyperv-iso: Clean up os dvd drive... ==> hyperv-iso: Unregistering and deleting virtual machine... ==> hyperv-iso: Deleting output directory... ==> hyperv-iso: Deleting temporary directory... Build 'hyperv-iso' errored: Error executing Chef: Non-zero exit status: 1

==> Some builds didn't complete successfully and had errors: --> hyperv-iso: Error executing Chef: Non-zero exit status: 1

==> Builds finished but no artifacts were created.