Giter VIP home page Giter VIP logo

Comments (5)

rdobson avatar rdobson commented on May 26, 2024

Hi @lgw4,

Have you tried removing the shutdown parameter:
"shutdown_command": "/sbin/halt",

In which case you'll probably need to add a delay on the shutdown (to prevent it from leaving the connection in a hung state).

from packer-plugin-xenserver.

lgw4 avatar lgw4 commented on May 26, 2024

Thanks for the quick reply, @rdobson.

However, when I add a value for shutdown_timeout to my template JSON file per the docs, I get an error.

$ packer validate centos-7.1.json 
Template validation failed. Errors are shown below.

Errors validating build 'xenserver-iso'. 1 error(s) occurred:

* Unknown configuration key: "shutdown_timeout"

I'm sure I'm missing something painfully obvious.

from packer-plugin-xenserver.

rdobson avatar rdobson commented on May 26, 2024

Hmm, perhaps the docs could be clearer. That timeout is actually for how long packer should wait before it reports a failure to shutdown the VM. I.e. after its executed the command in question.

Did you try removing the shutdown command from the template all together?

from packer-plugin-xenserver.

lgw4 avatar lgw4 commented on May 26, 2024

Thanks again for the quick reply.

I did, and I get this error:

==> xenserver-iso: Waiting for SSH to become available...
==> xenserver-iso: Connected to SSH!
==> xenserver-iso: Step: Shutting down VM
    xenserver-iso: Attempting to cleanly shutdown the VM...
==> xenserver-iso: Could not shut down VM: API Error: [VM_MISSING_PV_DRIVERS OpaqueRef:cb46fcbd-8baa-9d22-e869-f3cd672cb503]
==> xenserver-iso: WARNING: Forcing hard shutdown of the VM...
    xenserver-iso: Successfully shut down VM
==> xenserver-iso: Step: Start VM Paused
==> xenserver-iso: Unpausing VM 08da6f8f-2cfe-b934-5ce9-fb40598f46a3
==> xenserver-iso: Waiting 10s for boot...
==> xenserver-iso: Waiting for SSH to become available...
==> xenserver-iso: Timeout waiting for SSH.
==> xenserver-iso: Destroying VM
==> xenserver-iso: Destroying VDI
==> xenserver-iso: Deleting output directory...
Build 'xenserver-iso' errored: Timeout waiting for SSH.

==> Some builds didn't complete successfully and had errors:
--> xenserver-iso: Timeout waiting for SSH.

==> Builds finished but no artifacts were created.

from packer-plugin-xenserver.

rdobson avatar rdobson commented on May 26, 2024

Looks like SSH is not working when the VM is restarted:

==> xenserver-iso: Waiting for SSH to become available...
==> xenserver-iso: Timeout waiting for SSH.

Were you able to have a look at the console to see what was going on? Did the VM boot? Could you SSH in manually? (check the IP address Packer tried to connect to from the logs and make sure that hasn't changed too).

from packer-plugin-xenserver.

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.