-
Notifications
You must be signed in to change notification settings - Fork 20
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
File uploads over winrm failing #25
Comments
Forgot to mention - this may be related to issue #3 |
I've never seen this before. Is this a vanilla Win2008 iso? |
FYI sneal/go-winrm#3 |
Yes - Win 2008 R2 Standard
Like the reporter of that issue, I have executed It's worth mentioning that I only see this issue once every three or so builds. |
When you get onto one of those passing builds would you mind posting as much of Also, I'd be curious if you could get to a faster repro using this executable: packer-community/winrmcp |
Will attempt to repro directly with the winrmcp executable and get back to you. |
FWIW I have actually been able to reproduce this issue on a 2012r2 box fairly reliably. It was happening in 1/2 builds for me today. Whilst I haven't yet gotten to the bottom of it, adding an arbitrary sleep (60s) makes this go away, so it seems it could be some kind of race condition if the upload is the first Provisioner. |
A bit confused. Where would you put your "arbitrary sleep"? I want to repro this with winrmcp, not a dozen packer runs, if possible! |
Good point - this was with a Packer run. Assuming it is related to some kind of startup condition that is required, I suppose you could repro with a script that waits for WinRM to become available and then as soon as it was start uploading a file? Perhaps that's why it's hard to repro with winrmcp alone? |
Funnily enough I very frequently experienced this issue when uploading the VirtualBox guest additions (which gets uploaded immediately after WinRM becomes available). |
Finally had some free time to attempt to reproduce the error using winrmcp - with Windows Server 2008 R2. 7 attempts, 4 different errors. Results here: https://gist.github.com/zl4bv/bb5d5b6f322f29198535 Same WinRM config as before, EXCEPT for the following: The lower MaxMemoryPerShellMB value explains the error in attempt 4. Note that none of the 4 errors match the "The Windows Remote Shell cannot process the request; the selector value 42C971CD-F030-4FAD-B724-DD716B851563 specified in the request was not found." error from my original bug report. |
That's good stuff, thanks for the time you spent on this. @mefellows Were you getting the "selector value" error 2 days ago? |
I believe so, yes. I can confirm once back in the office next week. On Friday, April 3, 2015, Dylan Meissner [email protected] wrote:
Matt Fellows |
I'm being affected by this now too. Seems that I can't upload directories very well :/ |
@dylanmei An arbitrary sleep could be placed in the WinRM.bat (name may vary) by calling cmd.exe with "timeout 30" as 'timeout' is the Windows version of sleep, and it will keep that batch file open until the timeout completes, which might delay enough for Virtualbox additions to get a proper connection and work. |
Me too on 0.8.5 |
I just started trying packer yesterday so am a complete newby on it, so there very well be something I'm not doing right. However, I've yet to get anything to work on it. It looks like it is working and then this error occurs: I'm running packer 0.8.6 on Windows 7 host with VirtualBox 5 and this error is happening 100% of the time. I've tried about 20 times. I've also tried the above suggestions to put at end of winrm.bat: cmd.exe /c timeout 30 and also set the following in winrm.bat: cmd.exe /c winrm set winrm/config/winrs @{MaxMemoryPerShellMB="2048"} If needed I can give more configuration files. I also thought of trying to disable the VirtualBox Additions upload but haven't seen a way to do that yet. Should I try the SSH method of getting the VM configured before I come back and retry the WINRM method? At the moment I just need to get SOMETHING to work. I would prefer not to put SSH on the box but if not possible any other way, then I can live with it. |
@dwsummersaegis Get up to speed with this article: http://www.hurryupandwait.io/blog/creating-windows-base-images-for-virtualbox-and-hyper-v-using-packer-boxstarter-and-vagrant You can disable guest additions with this in your config: If you're open to SSH, try these templates: https://github.com/joefitzgerald/packer-windows |
Workaround: Install chocolatey in the unattended XML post-install then use that to install guest additions from the chocolatey repo. Feels less coupled as well. |
I let it slide for a few months and when I came back to it a few weeks ago Packer 0.10.0 was out and now for the first time I can get things to work. Thanks for the info! |
If you are using windows 2012 r2 in builder section run the below winrm powershell script as userdata netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow net stop winrm Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force` i think this can solve the issue even in windows 2008 |
I was still getting this error from boxcutter/windows, but upping the MaxMem to 2048 worked for me. |
Still had the issue today, Solved my problem and seems like it would be an elegant solution. |
@godric7 That solution fixed my issue. Much more elegant than upload. Thanks! |
File uploads are failing when performing the following actions:
Windows 7 Enterprise 64-bit host, Windows Server 2008 R2 Standard 64-bit virtualbox guest.
Below is the error I am seeing:
Below is a network trace of the messages associated with shell ID
42C971CD-F030-4FAD-B724-DD716B851563
- the body of theFault
messages represent the XML of the error message returned by packer (above).Below is an example packer JSON. The
scripts/
directory contains several PowerShell scripts and a couple of MSIs/MSUs.The text was updated successfully, but these errors were encountered: