Giter Club home page Giter Club logo

Comments (9)

mwrock avatar mwrock commented on July 30, 2024

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.

tpetchel avatar tpetchel commented on July 30, 2024

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.

mwrock avatar mwrock commented on July 30, 2024

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.

tpetchel avatar tpetchel commented on July 30, 2024

Got it now! I'll give that a shot and close the issue after confirming. Thanks Matt :)

from packer-templates.

tpetchel avatar tpetchel commented on July 30, 2024

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.

jeauxbleaux avatar jeauxbleaux commented on July 30, 2024

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.

mwrock avatar mwrock commented on July 30, 2024

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.

jeauxbleaux avatar jeauxbleaux commented on July 30, 2024

OK. So the communicators (winrm, ssh) are truly build host agnostic. That's what I was hoping. Thanks!

from packer-templates.

prashant645 avatar prashant645 commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.