mirror of
https://github.com/elasticdog/packer-arch.git
synced 2026-07-18 00:45:20 +00:00
http://comments.gmane.org/gmane.linux.arch.general/48739 Basically systemd kills the networking before it kills ssh sessions, and Packer will try and wait for a 0 exit code after the shutdown command to confirm that it worked. Things happen too quickly with systemd, and so Packer complains when gracefully halting the machine that: "Build 'vmware' errored: Shutdown command has non-zero exit status." This workaround just adds a standard systemd timer to the poweroff command so it has a one second delay, which is long enough for the 0 exit code to return and signal a successful graceful halt.
6 lines
80 B
SYSTEMD
6 lines
80 B
SYSTEMD
[Unit]
|
|
Description=Delayed poweroff
|
|
|
|
[Timer]
|
|
OnActiveSec=1
|
|
Unit=poweroff.target
|