Comments (24)
Yeah its a pretty terrible experience. Are you running with a gui? If it times out waiting for WinRM, it could be there was an error in the underlying box that you might be able t osee with the gui. However if you are like me, you may have gone to sleep only to wake up with that error message and a deleted VM. I believe there is a separate packer issue around preserving the VM when things go wrong.
Another potential issue is that it just was not finished by the end of the timeout. The timeout is 8 hours which is usually adequate but may need to be extended if your host is extremely under resourced. I suspect its not bandwidth thats the issue but would be more likely RAM/Disk. The machine I run this on is my daughters old laptop with a busted monitor but works fine if I RDP to it. Its not that beefy (I5/6GB/HDD (not SSD)).
from packer-templates.
currently im on an Ubuntu 14.04 host, which is an i7-something w/ 32GB of ram...I believe the VM is configured with 2 procs and 2GB of ram. SSD disk.
I edited the packer json to extend the timeout to 16 hours. The error from last night did go away with packer's cleanup. The linux terminal said something about Timeour waiting for WinRM
so I assume it took longer than 8 hours. I'll update later when it completes or errors out.
If it completes, I'll upload it to Azure. My ultimate plan is to apply a chef cookbook that installs vs2015 community and include a Vagrantfile in my OS project.
from packer-templates.
Well thats certainly beefy enough :) I'd bet it didn't just timeout but there was an error in the setup but after 8 hours, packer timed out and it all went away. Extending the timeout is good since it should give you more time to see the real issue in the vbox gui.
from packer-templates.
I am seeing the Timeout waiting for WinRM from my powershell session on my host.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO
==> virtualbox-iso: Creating floppy disk...
virtualbox-iso: Copying: answer_files/2012_r2/Autounattend.xml
virtualbox-iso: Copying: scripts/oracle.cer
virtualbox-iso: Copying: scripts/postunattend.xml
virtualbox-iso: Copying: scripts/boxstarter.ps1
virtualbox-iso: Copying: scripts/PackerShutdown.bat
virtualbox-iso: Copying: scripts/package.ps1
virtualbox-iso: Copying: scripts/SetupComplete-2012.cmd
virtualbox-iso: Copying: scripts/Test-Command.ps1
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3364)
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1458938405 --natpf1 guest_winrm,tcp,,55985,,5985
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1458938405 --memory 2048
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1458938405 --vram 48
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1458938405 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
Timeout waiting for WinRM
If I get on the virtualbox guest created with the vbox-2012r2.json file & type in
winrm set winrm/config/service '@{AllowUnencrypted="True"}' it connects over winrm & progresses further. Is there anyway to inject this in somewhere along the packer build or in a config file somewhere that loads before needing WinRM
from packer-templates.
The package script intentionally sets that property at the very end of the boxstarter run. If its done too early, packer will reboot the vm and then hands off the rest of the provisioning to the provisioner.
When you see the above timeout, that usually means that either something went wrong in the boxstarter run or windows updates took too long. If you have a Virtualbox GUI up, you may be able to tell what is wrong by an error in the console or looking in the boxstarter log at $env:localappdata\boxstarter\boxstarter.log
.
from packer-templates.
Hi Matt Sorry . Iam facing the same issue of winrm getting timed out .Please suggest any solution in regards with this since I have been lingering on the step for nearly 2 days. I have also set the winrm timeout to 8 hrs but also the winrm is timing out.
Below is the output which I have attached please check it and let me know a solution
PS C:\Users\panugpr1\Desktop\chef-repo\packer-templates-master> .\packer.exe build -force -only virtualbox-iso vbox-2012r2.json
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: file:///C:/Users/panugpr1/Desktop/chef-repo/packer-templates-master/iso/9600.17050.WIN
BLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO
==> virtualbox-iso: Creating floppy disk...
virtualbox-iso: Copying: answer_files/2012_r2/Autounattend.xml
virtualbox-iso: Copying: scripts/oracle.cer
virtualbox-iso: Copying: scripts/postunattend.xml
virtualbox-iso: Copying: scripts/boxstarter.ps1
virtualbox-iso: Copying: scripts/PackerShutdown.bat
virtualbox-iso: Copying: scripts/package.ps1
virtualbox-iso: Copying: scripts/SetupComplete-2012.cmd
virtualbox-iso: Copying: scripts/Test-Command.ps1
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Attaching floppy disk...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2781)
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459396712 --natpf1 guest_winrm,tcp,,55985,,5985
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459396712 --memory 2048
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459396712 --vram 48
virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1459396712 --cpus 2
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for WinRM to become available...
==> virtualbox-iso: Timeout waiting for WinRM.
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Timeout waiting for WinRM.
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Timeout waiting for WinRM.
from packer-templates.
see my comment just above yours. If the run has been going over 8 hours and you have decent hardware, something went wrong and you need to check the boxstarter log or the vbox gui for errors.
from packer-templates.
vbox gui doesnt show up any errors .I also cannot find the box starter.log file, is it present in the VM or my local worstation?
from packer-templates.
its in the vm at $env:LocalAppData\boxstarter\boxstarter.log
from packer-templates.
Hi Matt Below I am not able to see the log file.Below I am attaching my screenshot of the folder system check it once and guide me please
from packer-templates.
you want c:\users\vagrant\appdata\local\boxstarter
from packer-templates.
Hi Matt This is the screen shot of the last 20 line of the log.Can you please let me know the problem by looking at the log file. Because I am unable to diagnose the root cause or error
from packer-templates.
Hi matt please reply to the above thread.Please let me know the problem
from packer-templates.
looks like something went wrong further up. you could include a link to a gist of the whole thing.
from packer-templates.
oh gosh My entire vm got deleted now. and I wont be able to trace out the boxstarter.log.Could you suggest me any other method for building a windowsr2012 box for setting up a test kitchen instance.
from packer-templates.
oh...I know that pain.
You can always use mwrock/Windows2012R2 which is built from this template and I keep it pretty current.
from packer-templates.
fwiw, I set the timeout to 16 hours, ran the script on my laptop, and worked on other things, watching it. I got it to work, but i remember having to hit enter at a prompt for something.
from packer-templates.
yeah. a prompt would definitely be a bug.
from packer-templates.
Same here, 8h later it just killed everything off. I have the latest MacBook Pro machine with 16 cores and 16 GiB memory and the top-of-the-line SSD that I think can write 600 MiB/s. It's not about being underspecced. The my internet connection is 1000/1000 to the internet (and 300 mbps WiFi that caps out at 296 mbps in real life, because who wants cables to a MacBook Pro?).
To the contrary, I think it's a lot about network latency to MSFT servers and how it chooses to install its security updates (staged download-install-then-download-again). Is it possible to use one of the batch security update ISOs, you think?
from packer-templates.
Is there any way to get the boxstarter log when the VM is stuck at the following window?
from packer-templates.
The log can be found in %LOCALAPPDATA%\boxstarter
Its likely not going to have anything helpful. The call to windows update and check updates, especially on a clean win 7 VM can take a very long time.
from packer-templates.
Just a data point I am still getting this bug hashicorp/packer#3652 so hopefully next release of packer will address this
from packer-templates.
This looks very similar to an error I just had with the WinRM port. In commit 832eaeb it was set to 55985 instead of the default port of 5985. @mwrock just approved my pull request to change it in the vbox-2012r2.json. This might also be the problem in issue #76.
from packer-templates.
This is what I'm seeing when I open up the GUI. Its going through a ton of updates. I'll increase the timeout and see if its done then.
from packer-templates.
Related Issues (20)
- error when installing vbox-2016.json HOT 1
- endless "Waiting for WinRM to become available" HOT 13
- mwrock/Windows2012R2 box: "The source files could not be downloaded." HOT 1
- SSL Errors on Corporate Network (Proposed Solution) HOT 1
- can't login as administrator in Windows2012R2 HOT 1
- Reupload box mwrock/Windows2012R2Full' (v0.1.0) so URL isn't broken
- Nano Build 2.0Gb... any ideas as to why and how to make smaller
- Remove Berksfile.lock from repo
- Chef client not removed
- Failure in creation of Windows 2016 images HOT 5
- ChefDK14 w/ chef-solo run fails due to Mixin HOT 6
- Server 2012 R2 Download ISO Path Broken
- nano server output
- Server 2016 broken link HOT 3
- can't login as administrator in Windows2012R2 HOT 1
- windows cookbook dependency in packer-templates cookbook incompatible with latest chef-client versions
- Win2016 HyperV - No Search Match For NuGet HOT 4
- Issues installing Chef
- NS_ERROR_FAILURE (0x80004005) when Building Win7 on Ubuntu
- Creating HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-templates.