I'm trying to use the vagrant ubuntu/xenial64 box as my source ovf. Works fine in vagrant, but ssh is never reachable in packer.
packer.json:
{
"variables": {
"home": "{{env `HOME`}}"
},
"builders": [{
"type": "virtualbox-ovf",
"source_path": "{{user `home`}}/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20170705.0.0/virtualbox/box.ovf",
"headless": "true",
"boot_wait": "10s",
"ssh_username": "ubuntu",
"ssh_password": "48a16ff5a87dbd49b28864f6",
"ssh_wait_timeout": "10m",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -h 0",
"vrdp_bind_address": "0.0.0.0"
}],
"provisioners": [{
"type": "chef-solo",
"cookbook_paths": ["cookbooks"]
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": true,
"output": "box/akm_4.5.3.box"
}]
}
nicholas@pickle:~/dev/chef-akm$ packer build packer.json
virtualbox-ovf output will be in this color.
==> virtualbox-ovf: Downloading or copying Guest additions
virtualbox-ovf: Downloading or copying: file:///usr/share/virtualbox/VBoxGuestAdditions.iso
==> virtualbox-ovf: Downloading or copying OVF/OVA
virtualbox-ovf: Downloading or copying: file:///home/nicholas/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20170705.0.0/virtualbox/box.ovf
==> virtualbox-ovf: Importing VM: /home/nicholas/.vagrant.d/boxes/ubuntu-VAGRANTSLASH-xenial64/20170705.0.0/virtualbox/box.ovf
==> virtualbox-ovf: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2363)
==> virtualbox-ovf: Starting the virtual machine...
virtualbox-ovf: The VM will be run headless, without a GUI. If you want to
virtualbox-ovf: view the screen of the VM, connect via VRDP without a password to
==> virtualbox-ovf: Waiting 1m0s for boot...
==> virtualbox-ovf: Typing the boot command...
==> virtualbox-ovf: Waiting for SSH to become available...
==> virtualbox-ovf: Timeout waiting for SSH.
==> virtualbox-ovf: Unregistering and deleting imported VM...
==> virtualbox-ovf: Deleting output directory...
Build 'virtualbox-ovf' errored: Timeout waiting for SSH.
==> Some builds didn't complete successfully and had errors:
--> virtualbox-ovf: Timeout waiting for SSH.
==> Builds finished but no artifacts were created.