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

Cannot read WinRM info on Windows 2008 R2 #3

Closed
dylanmei opened this issue Jan 11, 2015 · 7 comments
Closed

Cannot read WinRM info on Windows 2008 R2 #3

dylanmei opened this issue Jan 11, 2015 · 7 comments

Comments

@dylanmei
Copy link
Contributor

As noted here and here, an administrator cannot access WinRM info on Windows 2008 R2.

⇒ bin/winrmcp -addr=localhost:5536 -info
<f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="win-2008-r2"><f:Message>Access is denied. </f:Message></f:WSManFault>
Error number:  -2147024891 0x80070005
Access is denied.

Client
    Addr: localhost:5536
    Auth: Basic
    User: packer
WinRM Config
    MaxEnvelopeSizeKB: 0
    MaxTimeoutMS: 0
    Service/MaxConcurrentOperations: 0
    Service/MaxConcurrentOperationsPerUser: 0
    Service/MaxConnections: 0
    Winrs/MaxConcurrentUsers: 0
    Winrs/MaxProcessesPerShell: 0
    Winrs/MaxMemoryPerShellMB: 0
    Winrs/MaxShellsPerUser: 0
@dylanmei
Copy link
Contributor Author

The info query is also used prior to copying a file in order to determine how many chunks it can send to the remote before needing to discard the current shell and initiate a new one.

@ramarnat
Copy link

confirmed independently using winrm commandline tool

winrm -hostname 172.16.111.135 -username "vagrant" -password "vagrant" "winrm get winrm/config -format:xml"
<f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="5" Machine="VAGRANT-51A0FAR"><f:Message>Access is denied. </f:Message></f:WSManFault>
Error number:  -2147024891 0x80070005
Access is denied.

@ramarnat
Copy link

How about allowing for the value for MaxEnvelopeSizeKB as a config parameter?

@dylanmei
Copy link
Contributor Author

I'm not ready to take in arguments like that. The machine itself is the source of truth, and if we can't read it out the I'd like it degrade gracefully.

Commit c29edbd is a small step in that direction, and will work around the winrmcp copy problem for a standard 2008 R2 installation.

@ramarnat
Copy link

I played around with wsman, and TrustedHosts settings to get powershell to return the values, but none worked.

@dylanmei
Copy link
Contributor Author

I have it working in branch winrmcp/elevated_info_query but it's hardcoded to vagrant/vagrant and it's not ready for prime-time without tests and a refactor or three. 🙈

@dylanmei
Copy link
Contributor Author

dylanmei commented Mar 8, 2015

I've worked around this by 1. allowing max-ops-per-shell to be provided to the cli/lib and 2. setting the default to 15 to make Windows 2008 R2 happy.

@dylanmei dylanmei closed this as completed Mar 8, 2015
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