Could you rerun with PACKER_LOG=1 packer build -on-error=ask template.json When the ssh fails. Connect with ssh manually with -vv argument. Post the logs/output of both the manual ssh and Packer here.
On Thu, Feb 7, 2019, 12:07 Bikash Bhandari <[email protected] wrote: > I am unable to to create an OVA/OVF from an existing OVA. The issue is on > using ssh_private_key_file. I have tried with giving absolute path to > id_rsa file with permission 600 and 400. However, the issue is stil the > same. Having said, that I could connect to the machine form the host > machine when the machine was powered on for few seconds in between. is this > a packer bug or related to virtualbox I have no idea. Even I have tried > with different versions of virtualbox, the issue is recurrent. > > > My json file. > > *{* > > *"builders"**:* *[**{* > > *"type"**:** "virtualbox-ovf"**,* > > *"source_path"**:** "/root/<filename>.ova"**,* > > *"ssh_username"**:** "support"**,* > > *"ssh_private_key_file"**:** "/home/ubuntu/id_rsa"**,* > > *"ssh_port"**:* 22*,* > > *"vrdp_bind_address"**:** "0.0.0.0"**,* > > *"guest_additions_mode"**:** "disable"**,* > > *"virtualbox_version_file"**:** ""**,* > > *"headless"**:* true*,* > > *"ssh_skip_nat_mapping"**:** "*true*"**,* > > *"boot_wait"**:** "120s"**,* > > *"ssh_wait_timeout"**:** "10m"**,* > > *"shutdown_command"**:** ""**,* > > *"vboxmanage"**:* *[* > > *[* > > *"modifyvm"**,* > > *"**{{**.Name**}}**"**,* > > *"--nic1"**,* > > *"bridged"* > > *]**,* > > *[* > > *"modifyvm"**,* > > *"**{{**.Name**}}**"**,* > > *"--bridgeadapter1"**,* > > *"ens160"* > > *]* > > *]* > > *}**]**,* > > *"provisioners"**:* *[* > > *{* > > *"type"**:** "file"**,* > > *"source"**:** "/home/ubuntu/<file>.sh"**,* > > *"destination"**:** "/tmp/"* > > *},* > > *{* > > *"type"**:** "shell"**,* > > *"inline"**:* *[**"sudo -S /bin/bash /tmp/<file>.sh"**]**,* > > *"expect_disconnect"**:** "*true*"**,* > > *"start_retry_timeout"**:**"10m"* > > > > *}* > > *]* > > > > > *}* > > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/packer-tool/5bcd338b-2db6-4854-8f5a-f2e8e0c3fe2b%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/5bcd338b-2db6-4854-8f5a-f2e8e0c3fe2b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt_aUkTYjVwThm6EjDvPRQmzDytbkCn3wq4VYw%3DSSLZSLw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
