Packer: virtualbox: Fails with communicator:none

Created on 2 Jun 2017  ยท  5Comments  ยท  Source: hashicorp/packer

Packer Version:
Packer v1.0.0

Host OS:
macOS Sierra 10.12.5

Debug Log:
https://gist.github.com/idahood/aa8436b5c5cd681366847dd23ebcf72c

Builder Template:
https://gist.github.com/idahood/02e87dfa4220a68adb36878c9966e364

The VM fails to start when '"communicator": "none"' is set. Using the default ssh method (and adding the ssh_username/ssh_password key value pairs) causes the VM to start normally (and then the builder hangs waiting for SSH access). I would expect the SSH access to hang, because this builder is for a network vendor's VM that requires additional configuration. My plan was to generate an OVA/OVF from this initial template (which basically runs an installer and ejects the install media). I'd then then add requisite SSH configuration using another separate virtualbox-ovf builder.

bug buildevirtualbox

Most helpful comment

Just confirming this works now with: Packer v1.1.0-dev

All 5 comments

For some reason you VirtualBox refuses to start the VM

==> virtualbox-iso: Starting the virtual machine...
2017/06/02 09:18:32 packer: 2017/06/02 09:18:32 Executing VBoxManage: []string{"startvm", "packer-virtualbox-iso-1496416711", "--type", "gui"}
2017/06/02 09:18:33 packer: 2017/06/02 09:18:33 stdout: Waiting for VM "packer-virtualbox-iso-1496416711" to power on...
2017/06/02 09:18:33 packer: 2017/06/02 09:18:33 stderr: VBoxManage: error: The VM session was aborted
2017/06/02 09:18:33 packer: VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface ISession

Right, so here's the other log with the template using ssh as the communicator method (VM starts without issue):
https://gist.github.com/idahood/d4c8db9450767f7af02d8135d160be38

And the template:
https://gist.github.com/idahood/4458974bc86093873b5916a475019558

The only difference is what communicator method packer is invoking:

sdodd-ltm:EXOS sdodd$ diff vm-21.1.2.14.json vm-21.1.2.14.alternate
8c8,9
<     "communicator": "none",
---
>     "ssh_username": "arbitrary_string",
>     "ssh_password": "",

You also have to set "virtualbox_version_file": "".

Just confirming this works now with: Packer v1.1.0-dev

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings