Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

vagrant up fails to boot up Metasploitable3 #4

Closed
ptrac3 opened this issue Sep 17, 2016 · 10 comments
Closed

vagrant up fails to boot up Metasploitable3 #4

ptrac3 opened this issue Sep 17, 2016 · 10 comments

Comments

@ptrac3
Copy link

ptrac3 commented Sep 17, 2016

I have Mac OS X 10.11.6 and i have followed the guide to deploy metasploitable 3. Everything seems fine, the machine starts to boot up but after a few scripts i receive this error and the machine suddenly shuts down:

==> default: C:\Windows\system32>net localgroup "Replicator" chewbacca /ADD 
==> default: The command completed successfully.
==> default: Running provisioner: shell...
    default: Running: inline PowerShell script
==> default: Running provisioner: shell...
==> default: Running cleanup tasks for 'reload' provisioner...
==> default: Running cleanup tasks for 'reload' provisioner...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
/opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:64:in `raise_if_wsman_fault': [WSMAN ERROR CODE: 2150859174]: <f:WSManFault Code='2150859174' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message>The WS-Management service cannot process the request. This user is allowed a maximum number of 50 concurrent operations, which has been exceeded. Close existing operations for this user, or raise the quota for this user. </f:Message></f:WSManFault> (WinRM::WinRMWSManFault)
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:51:in `raise_if_error'
... TRIMMED ...

Full stack trace

==> default: C:\Windows\system32>net localgroup "Replicator" chewbacca /ADD 
==> default: The command completed successfully.
==> default: Running provisioner: shell...
    default: Running: inline PowerShell script
==> default: Running provisioner: shell...
==> default: Running cleanup tasks for 'reload' provisioner...
==> default: Running cleanup tasks for 'reload' provisioner...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
/opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:64:in `raise_if_wsman_fault': [WSMAN ERROR CODE: 2150859174]: <f:WSManFault Code='2150859174' Machine='127.0.0.1' xmlns:f='http://schemas.microsoft.com/wbem/wsman/1/wsmanfault'><f:Message>The WS-Management service cannot process the request. This user is allowed a maximum number of 50 concurrent operations, which has been exceeded. Close existing operations for this user, or raise the quota for this user. </f:Message></f:WSManFault> (WinRM::WinRMWSManFault)
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:51:in `raise_if_error'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:35:in `parse_to_xml'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/transport.rb:200:in `send_request'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/winrm_service.rb:492:in `send_message'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/winrm_service.rb:393:in `run_wql'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/command_executor.rb:190:in `os_version'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/command_executor.rb:149:in `code_page'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/command_executor.rb:72:in `block in open'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/command_executor.rb:222:in `retryable'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/command_executor.rb:71:in `open'
    from /opt/vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/winrm_service.rb:359:in `create_executor'
    from /opt/vagrant/embedded/gems/gems/winrm-fs-0.3.2/lib/winrm-fs/file_manager.rb:110:in `upload'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/communicators/winrm/shell.rb:76:in `upload'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/communicators/winrm/communicator.rb:173:in `upload'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:114:in `block (2 levels) in provision_winrm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:105:in `tap'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:105:in `block in provision_winrm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:220:in `with_script_file'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:104:in `provision_winrm'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/provisioners/shell/provisioner.rb:22:in `provision'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision.rb:133:in `run_provisioner'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:473:in `hook'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision.rb:121:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision.rb:121:in `block in call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision.rb:103:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/provision.rb:103:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/box_check_outdated.rb:36:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/match_mac_address.rb:19:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/discard_state.rb:15:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/import.rb:74:in `import'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/import.rb:13:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/prepare_clone.rb:15:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/customize.rb:40:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:225:in `action_raw'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:200:in `block in action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:561:in `lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
    from /opt/vagrant/embedded/gems/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `call'
    from /opt/vagrant/embedded/gems/gems/logging-2.1.0/lib/logging/diagnostic_context.rb:450:in `block in create_with_logging_context'
@ptrac3 ptrac3 changed the title Cannot fully boot up Metasploitable 3 vagrant up fails to boot up Metasploitable3 Sep 17, 2016
@erran-r7
Copy link
Contributor

Looks like the cause for shutting down was a WinRM WSManFault (code: 2150859174):

The WS-Management service cannot process the request. This user is allowed a maximum number of 50 concurrent operations, which has been exceeded. Close existing operations for this user, or raise the quota for this user.

@Sliim
Copy link
Contributor

Sliim commented Sep 19, 2016

I got the same error, my workaround was to reload the virtual machine during the provisioning...

diff --git a/Vagrantfile b/Vagrantfile
index 9f30c87..c572073 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -27,6 +27,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/configs/create_users.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Unpatched IIS
   config.vm.provision :shell, path: "scripts/installs/setup_iis.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -35,6 +37,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/installs/setup_caidao.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Setup for Apache Struts
   config.vm.provision :shell, path: "scripts/chocolatey_installs/java.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -50,6 +54,8 @@ Vagrant.configure("2") do |config|
   config.vm.provision :shell, path: "scripts/installs/start_glassfish_service.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614

+  config.vm.provision :reload
+
   # Vulnerability - Jenkins (1.8)
   config.vm.provision :shell, path: "scripts/installs/setup_jenkins.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
@@ -57,4 +63,4 @@ Vagrant.configure("2") do |config|
   # Configure Firewall to open up vulnerable services
   config.vm.provision :shell, path: "scripts/configs/configure_firewall.bat"
   config.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614
-end
\ No newline at end of file
+end

@jbarnett-r7
Copy link
Contributor

jbarnett-r7 commented Sep 19, 2016

There is a bug with the latest version of Vagrant (1.8.5) that is preventing the open WinRM connections to close out properly in between script calls. The bug is documented at hashicorp/vagrant#7489 and also seems to be related to the bug referenced in hashicorp/vagrant#7614. This has been a pain during development and multiple workarounds were necessary.

I personally added this monkey patch to my personal environment, but a lot of others in those threads recommend using Vagrant 1.8.1 instead. I actually recommended this in the wiki, but this issue makes me realize I need to add it to the README also.

Let us know if the above workarounds resolve the issue for you.

@jbarnett-r7
Copy link
Contributor

I added build scripts for both Windows Powershell and bash. It will go through and check your environment to ensure everything is compatible. If you're still having issues building you might want to give that a shot. I'd like to know how it works for you.

@ptrac3
Copy link
Author

ptrac3 commented Sep 28, 2016

I have tried the change and the VM boots up bust only a few services are up and running so there i'm still experiencing issue..:(

@jbarnett-r7
Copy link
Contributor

jbarnett-r7 commented Sep 30, 2016

Thank you for giving that a shot. I think what happened is that Vagrant is trying to continue from where it left off when it errored out the previous time. It does this in order to cut down on time and avoid re-doing the same tasks. Since it errorerd out previously you're missing everything from before the point it restarted from.

I would suggest doing a vagrant destroy to remove the VM that is currently in error state, and then doing vagrant up again. That should get all of the services up for you. Please let me know how it goes.

Also, I'll look into updating the build script to add messaging around this to make it more clear.

@LonerVamp
Copy link

I also ran into the issue with having more than 50 concurrent operations in WinRM. I was able to sneak a command onto the VM after the first reboot. Logged in, opened a cmd window, and quickly sent in: "winrm set winrm/config/service @{MaxConcurrentOperationsPerUser="500"}

@busterb
Copy link
Member

busterb commented Oct 28, 2016

Thanks @LonerVamp - is your change persistent across reboots? If so, we could probably add that to the packer provisioning steps as a workaround as well.

@LonerVamp
Copy link

Yup, that should be a persistent value on the OS.

@jbarnett-r7
Copy link
Contributor

I put a PR up to increase the base limits: #27

This should be fixed with the next Vagrant release, but this will get us through in the meantime.

jbarnett-r7 pushed a commit that referenced this issue Dec 15, 2017
usmcfiredog added a commit to usmcfiredog/metasploitable3 that referenced this issue Sep 20, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants