I am using Packer to build a VirtualBox image for Ubuntu 14.04. I have a Packer script here, which used to work, but then for some reason (and several VirtualBox updates later) started failing. The install keeps getting stuck on the "Select and install software" step:
If I run the script using the -debug
option, I don't get any useful information out from Packer itself:
~/Projects/src/github.com/yunojuno/trifecta/packer(master)$ SSH_USERNAME=vagrant SSH_PASSWORD=vagrant packer build -debug template.json
Debug mode enabled. Builds will not be parallelized.
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Pausing after run of step 'StepDownloadGuestAdditions'. Press enter to continue.
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04.3-server-amd64.iso
==> virtualbox-iso: Pausing after run of step 'StepDownload'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'StepOutputDir'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'StepCreateFloppy'. Press enter to continue.
==> virtualbox-iso: Starting HTTP server on port 8532
==> virtualbox-iso: Pausing after run of step 'StepHTTPServer'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'StepSuppressMessages'. Press enter to continue.
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Pausing after run of step 'stepCreateVM'. Press enter to continue.
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Pausing after run of step 'stepCreateDisk'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'stepAttachISO'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'StepAttachGuestAdditions'. Press enter to continue.
==> virtualbox-iso: Pausing after run of step 'StepAttachFloppy'. Press enter to continue.
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 4141)
==> virtualbox-iso: Pausing after run of step 'StepForwardSSH'. Press enter to continue.
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm ubuntu1404 --memory 4096
virtualbox-iso: Executing: modifyvm ubuntu1404 --cpus 1
==> virtualbox-iso: Pausing after run of step 'StepVBoxManage'. Press enter to continue.
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Pausing after run of step 'StepRun'. Press enter to continue.
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Pausing after run of step 'StepTypeBootCommand'. Press enter to continue.
==> virtualbox-iso: Waiting for SSH to become available...
The script just hangs at that point - as the unattended install has failed (see screenshot above).
The boot command is:
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz ",
"noapic ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg auto ",
"locale=en_US ",
"kbd-chooser/method=us ",
"keyboard-configuration/modelcode=pc105 ",
"keyboard-configuration/layout=US ",
"keyboard-configuration/variant=US ",
"hostname={{ .Name }} ",
"fb=false ",
"debconf/frontend=noninteractive ",
"console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- ",
"<enter>"
],
I don't know enough about Linux installs to debug this - how do I know what is really failing, and fix it?