From 456208388333bb10233822ce033ee433ff47909a Mon Sep 17 00:00:00 2001 From: Gergely Szabo Date: Mon, 9 Jul 2018 13:32:08 +0200 Subject: [PATCH 1/3] Fixing shutdown_command doc for qemu builder --- website/source/docs/builders/qemu.html.md.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/source/docs/builders/qemu.html.md.erb b/website/source/docs/builders/qemu.html.md.erb index 5d6de7e45..86bb8431f 100644 --- a/website/source/docs/builders/qemu.html.md.erb +++ b/website/source/docs/builders/qemu.html.md.erb @@ -36,7 +36,7 @@ to files, URLS for ISOs and checksums. "iso_checksum": "af4a1640c0c6f348c6c41f1ea9e192a2", "iso_checksum_type": "md5", "output_directory": "output_centos_tdhtest", - "shutdown_command": "shutdown -P now", + "shutdown_command": "echo 'packer' | sudo -S shutdown -P now" "disk_size": 5000, "format": "qcow2", "headless": false, @@ -326,10 +326,10 @@ default port of `5985` or whatever value you have the service set to listen on. - `shutdown_command` (string) - The command to use to gracefully shut down the machine once all the provisioning is done. By default this is an empty string, which tells Packer to just forcefully shut down the machine unless a - shutdown command takes place inside script so this may safely be omitted. If - one or more scripts require a reboot it is suggested to leave this blank - since reboots may fail and specify the final shutdown command in your - last script. + shutdown command takes place inside script so this may safely be omitted. It + is important to add a `shutdown_command`. By default Packer halts the virtual + machine and the file system may not be sync'd. Thus, changes made in a + provisioner might not be saved. - `shutdown_timeout` (string) - The amount of time to wait after executing the `shutdown_command` for the virtual machine to actually shut down. If it From 3d1bb332e1f6a8558c9fdf2fef8a6333bba89c72 Mon Sep 17 00:00:00 2001 From: Gergely Szabo Date: Mon, 9 Jul 2018 13:42:54 +0200 Subject: [PATCH 2/3] Shutdown_command for qemu improved. --- website/source/docs/builders/qemu.html.md.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/source/docs/builders/qemu.html.md.erb b/website/source/docs/builders/qemu.html.md.erb index 86bb8431f..4f51fdc94 100644 --- a/website/source/docs/builders/qemu.html.md.erb +++ b/website/source/docs/builders/qemu.html.md.erb @@ -329,7 +329,9 @@ default port of `5985` or whatever value you have the service set to listen on. shutdown command takes place inside script so this may safely be omitted. It is important to add a `shutdown_command`. By default Packer halts the virtual machine and the file system may not be sync'd. Thus, changes made in a - provisioner might not be saved. + provisioner might not be saved. If one or more scripts require a reboot it is + suggested to leave this blank since reboots may fail and specify the final + shutdown command in your last script. - `shutdown_timeout` (string) - The amount of time to wait after executing the `shutdown_command` for the virtual machine to actually shut down. If it From b2098ce9d565a14160ceb590cc28d89d245d13c2 Mon Sep 17 00:00:00 2001 From: Gergely Szabo Date: Mon, 9 Jul 2018 13:46:15 +0200 Subject: [PATCH 3/3] Missing comma in the qemu builder example --- website/source/docs/builders/qemu.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/builders/qemu.html.md.erb b/website/source/docs/builders/qemu.html.md.erb index 4f51fdc94..c4b6aa26c 100644 --- a/website/source/docs/builders/qemu.html.md.erb +++ b/website/source/docs/builders/qemu.html.md.erb @@ -36,7 +36,7 @@ to files, URLS for ISOs and checksums. "iso_checksum": "af4a1640c0c6f348c6c41f1ea9e192a2", "iso_checksum_type": "md5", "output_directory": "output_centos_tdhtest", - "shutdown_command": "echo 'packer' | sudo -S shutdown -P now" + "shutdown_command": "echo 'packer' | sudo -S shutdown -P now", "disk_size": 5000, "format": "qcow2", "headless": false,