-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comments
Looks like the cause for shutting down was a WinRM WSManFault (code:
|
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 |
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. |
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. |
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..:( |
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 Also, I'll look into updating the build script to add messaging around this to make it more clear. |
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"} |
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. |
Yup, that should be a persistent value on the OS. |
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. |
Use Crystal loader for Sinatra
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:
Full stack trace
The text was updated successfully, but these errors were encountered: