Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Windows 2008/Powershell 1.0 file manager support #198

Closed
palfrey opened this issue Jul 7, 2014 · 4 comments
Closed

Windows 2008/Powershell 1.0 file manager support #198

palfrey opened this issue Jul 7, 2014 · 4 comments

Comments

@palfrey
Copy link

palfrey commented Jul 7, 2014

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

@sneal
Copy link
Member

sneal commented Jul 7, 2014

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.

@palfrey
Copy link
Author

palfrey commented Aug 4, 2014

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.

@palfrey
Copy link
Author

palfrey commented Aug 4, 2014

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) &lt;&lt;&lt;&lt; .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...

@sneal
Copy link
Member

sneal commented Dec 22, 2014

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.

@sneal sneal closed this as completed Dec 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants