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

C:\startup\enable_firewall.bat does not exist. #455

Closed
yuanzhel opened this issue Mar 28, 2020 · 3 comments
Closed

C:\startup\enable_firewall.bat does not exist. #455

yuanzhel opened this issue Mar 28, 2020 · 3 comments

Comments

@yuanzhel
Copy link

yuanzhel commented Mar 28, 2020

Issue Description

Please check the General Issues section in the wiki before you submit the issue.
If you didn't find your issue mentioned, please give a thorough description of the issue you're seeing.
Also, please be sure to include any troubleshooting steps that you've already attempted.

Host System

  • OS: Windows10 PRO
  • Packer Version: 1.3.4
  • Vagrant Version: vagrant 2.2.7
  • VirtualBox Version: 6.0.18

Command Output

Hi, I chose to manually build and got the successfully message.
After vagrant up win2k8, everything worked fine utill the final execute script stage.
The error is simple:
==> win2k8: Running provisioner: shell... win2k8: Running: inline PowerShell script win2k8: C:\startup\enable_firewall.bat : The term 'C:\startup\enable_firewall.bat' is win2k8: not recognized as the name of a cmdlet, function, script file, or operable win2k8: program. Check the spelling of the name, or if a path was included, verify win2k8: that the path is correct and try again. win2k8: At C:\tmp\vagrant-shell.ps1:1 char:1 win2k8: + C:\startup\enable_firewall.bat win2k8: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ win2k8: + CategoryInfo : ObjectNotFound: (C:\startup\enable_firewall.bat: win2k8: String) [], CommandNotFoundException win2k8: + FullyQualifiedErrorId : CommandNotFoundException
Same thing goes for every script list in vegrantfile, I delete them to make it easier to read.
I have checked in VM, in C:\Startup I didn't have these scripts, I only have startup it self as a script,
@echo off ping -n 1 -4 172.28.128.3 | find /i "TTL=" > nul IF ERRORLEVEL 1 (echo "Linux host not availabe.") ELSE ( cmdkey /add:172.28.128.3 /user:chewbacca /pass:rwaaaaawr5 net use w: \\172.28.128.3\public /savecred /p:yes )

Please help to determine which stage make this happen. Maybe build stage loose something?

PS:
I have seen the known issue WIki, I can't use the preferred vagrant version due to it only support Virtualbox 5.x which can't open in windows10( not sure the reason, I just choice 6.x to make life easier).
Just a reminder: I base in China, so in build stage I interrupt the auto install ssh script, manually set LAN proxy and download the ssh installer, the version is exact 7.1 as the auto script print. after install it the build stage goes on, it said something like ssh connected.

@yuanzhel
Copy link
Author

Update, fcking windows definder removed jmx.exe, will recover and build again to check.

@yuanzhel
Copy link
Author

yuanzhel commented Mar 28, 2020

Update, still not work. uploading these scripts is actually failed. I didn't find them in VM. My local build box is also small than the cloud pre-build box. Anyway, I give it up because I really can't understand how windows powershell and those virtul-machine works.
I just want update the README.md with these things I realized:

  1. IF U want to build it manually, use virtualbox unless u have the vagrant-provider-plugin-vmware(without it, u can't un-pcak ur build box and export it to vmware), it will cost $79.
  2. Seems virtualbox 5.x can't open in windows 10, at least it not open in my machine, 6.x works fine.
  3. IF U build in China, remember to set proxy in VM, otherwise none of the program can be downloaded.
  4. U also can't use vagrant add 'rapid7/metasploitable3-win2k8' in China, it has been blocked with GFW. Here is way how to download manually: https://gist.github.com/firmanelhakim/77b6ee7fb50883155eeefc9e0dc10b9b
  5. WINDOWS is SHIT :-).

@jmartin-tech
Copy link
Contributor

Closing for now. Some notes:

  1. This has changed the latest code base is now a free plugin https://github.com/hashicorp/vagrant-vmware-desktop
  2. Update general dependencies #562 should now provide Virtualbox 6.x and newer packer support.
  3. & 4. are location specific and while I understand the desire for documentation region specific issues recommending things like this bypassing regional restrictions is not something this project is likely to do.

# 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

2 participants