Closed palfrey closed 9 years ago
Can you try hacking out the try/finally block out of your local Vagrant install (in winrmfilemanager.rb) and see if that fixes it? If that works then we'll just rip it out, its not really needed.
Removing that (killing the "try" and the "finally", but keeping all the code within) certainly gets things further. I'm still seeing weird errors regarding shared folders not being setup, but I'll keep you posted.
Ah-hah. test-wsman isn't there
DEBUG guestnetwork: querying WSMan version
DEBUG winrmshell: powershell executing:
((test-wsman).productversion.split(" ") | select -last 1).split("\.")[0]
if ($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 0 }
DEBUG winrmshell: Output: {:data=>[{:stderr=>"#< CLIXML\r\n"}, {:stderr=>"<?xml version=\"1.0\" encoding=\"IBM437\"?><Objs Version=\"1.1\" xmlns=\"http://schemas.microsoft.com/powershell/2004/04\"><S S=\"Error\">The term 'test-wsman' is not recognized as a cmdlet, function, operable program\r\n</S><S S=\"Error\">, or script file. Verify the term and try again.\r\n</S><S S=\"Error\">At line:1 char:13\r\n</S><S S=\"Error\">+ ((test-wsman) <<<< .productversion.split(\" \") | select -last 1).split(\"\\.\")[0\r\n</S><S S=\"Error\">]\r\n</S></Objs>"}], :exitcode=>0}
This appears to be causing later things to break...
This plugin is no longer maintained since Vagrant natively supports Windows guests. If you have a Vagrant issue you need to ask the Vagrant mailing list or file a GitHub issue on Vagrant core.
Files attempting to be uploaded get the following problem. lib/vagrant-windows/communication/winrmfilemanager.rb should_upload_file? uses the "finally" keyword, and Powershell 1.0 gets the error "The 'finally' keyword is not supported in this version of the language". As this is the version of Powershell installed by default with 2008, this breaks stuff.
In more fun news, the Powershell error isn't outputted to normal output, and I had to find it in the DEBUG log. Actual output is
'install.bat' is not recognized as an internal or external command
Which is very informative
http://cashfoley.com/CommentView,guid,c3f862ff-b496-437d-925f-25c5f90ad482.aspx has a hacky workaround for this