Skip to content

Packer SSH shell provisioner not triggering? #73

@HariSekhon

Description

@HariSekhon

It appears that the SSH shell provisioner isn't triggering on my Fedora build on Tart which is almost identical to my build on x86_64 VirtualBox.

You can reproduce this like so

git clone https://github.com/HariSekhon/Packer-templates pack

cd pack

make fedora-tart-http

The output is:

...
Fedora ISOs prepared
pkill -9 -if -- '.*python.* -m http.server'
cd installers && python3 -m http.server &
packer build --force fedora-38-arm64.tart.http.pkr.hcl
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
fedora-38.tart-cli.fedora-38: output will be in this color.

==> fedora-38.tart-cli.fedora-38: Creating virtual machine...
==> fedora-38.tart-cli.fedora-38: Starting the virtual machine for installation...
==> fedora-38.tart-cli.fedora-38: Waiting for the VNC server credentials from Tart...
==> fedora-38.tart-cli.fedora-38: Retrieved VNC credentials, connecting...
==> fedora-38.tart-cli.fedora-38: Connected to the VNC!
==> fedora-38.tart-cli.fedora-38: Typing the commands over VNC...
==> fedora-38.tart-cli.fedora-38: Waiting for the install process to shutdown the VM...

The Fedora prompt is up but the SSH provisioner never triggers, as verified by logging in and checking that the /etc/packer-version file created by my script never materializes, and the VM never shuts down to complete the build.

Those last 2 lines of the output are what makes me think that the SSH commands are not being run as when I got to tty2 to investigate there was no /etc/packer-version created by script and I can't see a hanging bash command it in the ps output (although it doesn't help that I have | pipe symbol to be able to less through the ps output).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions