From b2b7e99b575dfe966d7bd10db0238a8eec5c9a12 Mon Sep 17 00:00:00 2001 From: Jon Stevens Date: Mon, 14 Oct 2013 17:59:53 -0700 Subject: [PATCH] I found that I needed the shutdown command to be run as root. Also added a note about shutdown_command that bit me. --- website/source/docs/builders/virtualbox.html.markdown | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/website/source/docs/builders/virtualbox.html.markdown b/website/source/docs/builders/virtualbox.html.markdown index b10cd8cb0..0045b7460 100644 --- a/website/source/docs/builders/virtualbox.html.markdown +++ b/website/source/docs/builders/virtualbox.html.markdown @@ -28,11 +28,16 @@ Ubuntu to self-install. Still, the example serves to show the basic configuratio "iso_checksum": "2cbe868812a871242cdcdd8f2fd6feb9", "iso_checksum_type": "md5", "ssh_username": "packer", + "ssh_password": "packer", "ssh_wait_timeout": "30s", - "shutdown_command": "shutdown -P now" + "shutdown_command": "echo 'packer' | sudo -S shutdown -P now" } +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. + ## Configuration Reference There are many configuration options available for the VirtualBox builder.