Comments (9)
Yeah it takes almost 5 hours on my test host box. I've seen it complete just 10 minutes short of the 5 hour timeout so it might be a good idea to extend to 8h (ugh). I do think there are things to be done to speed up the updates. However the dism and file zapping take a while too but clearly the updates take the longest by far.
The idea here is that building images is an infrequent event as opposed to provisioning VMs. So I'm willing to put up with the wait but it does suck that packer deletes the artifacts on failure making it difficult to troubleshoot.
from packer-templates.
Hi Matt,
My feedback wasn't about the length of time it takes to run so much as the error that I'm getting. Notice above that it fails with this error:
Build 'virtualbox-iso' errored: Timeout waiting for WinRM.
I don't see any other instructions in the README besides downloading the .iso and running packer
. Any idea whether there's another step involved?
from packer-templates.
Sorry for the misunderstanding. I go into alot more detail in my blog post.
The packer flow is that once it can connect via winrm, it shuts down the box and starts the provisioners. I dont put all the setup stuff in a provisioner because boxstarter reboots would cause that to fail. So instead, I leave winrm off until everything is done. This way packer just waits until the whole process is complete and thats why I was talking about the timeout.
If it does not complete before the timeout. Packer fails the entire build.
from packer-templates.
Got it now! I'll give that a shot and close the issue after confirming. Thanks Matt :)
from packer-templates.
OK, I tried again and it worked great! Sounds like it didn't complete in the timeout period the first time (computer went to sleep perhaps?), but did the second time.
@mwrock: thanks for the help.
from packer-templates.
Pardon for the late entry, I've rather basic question. my packer build hosts are on redhat and debian. Is the winrm communicator for when the build host is a windows box?
thx
from packer-templates.
These still use a winrm communicator even though they are linux hosts. The main difference on linux hosts (assuming you are running as a server and not desktop) is that the VirtualBox build is headless and therefore you cant see into what the VM is doing while the host is waiting for WinRM to connect.
from packer-templates.
OK. So the communicators (winrm, ssh) are truly build host agnostic. That's what I was hoping. Thanks!
from packer-templates.
Hi Matt Sorry again for the late entry. 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.
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
- Create templates for Win2008 R2 HOT 1
- 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.