Packer: Packer 1.4.0: virtualbox-ovf builder fails to download source image

Created on 12 Apr 2019  ยท  19Comments  ยท  Source: hashicorp/packer

Download of source image fails reproducibly on different agents of our CI system. Previous version 1.3.5 works using identical configuration.

Most helpful comment

Awesome ! Your issue was the one I had too and that got fixed in ~#7496~ https://github.com/hashicorp/packer/pull/7497. Thanks for confirming ! ๐Ÿ™‚

All 19 comments

Hello @Occams, sorry about that, please share your buildfile.

Hey @azr. I just updated the gist.
https://gist.github.com/Occams/c2a72f07c3ac467a79566ad745645b48

The packer build command line used is dynamically generated by scripting:

D:\Apps\Packer\packer.exe build -force -timestamp-ui -on-error="abort" -only=vbox-preinstalled-win10 -var 'source_path_win10=D:\BuildAgent\temp\buildTmp\files\base_image\VirtualBox\agenda-base-win10.ova' -var 'dvd_drive_letter=D:' -var 'cpus=4' -var 'agenda_dvd_source=D:\' -var 'username=agenda-user' -var 'password=agenda' -var 'memory=8192' -var 'vagrant_post_up_message=Welcome! This box was provisioned with src[125358]_rtm[35525]_build[7085]_article[972045]' -var 'vagrantfile_template=D:\BuildAgent\temp\buildTmp\vagrantfile.template' -var 'agenda_target=C:\Agenda\' -var 'agenda_setup_artifacts=D:\BuildAgent\temp\buildTmp\files' -var 'agenda_setup_logfilepath=C:\Windows\Temp\setup\SetupSilent.log' -var 'serial_file_redirect_path=D:\BuildAgent\temp\buildTmp\Agenda_Develop_Staging_MachineImages_PreinstalledBoxes_Windows10Preinstalled\vbox_com1_redirect.log' -var 'vagrant_box_name=vbox-preinstalled-win10' -var 'shrink_image=false' -var 'output_directory=D:\BuildAgent\temp\buildTmp\Agenda_Develop_Staging_MachineImages_PreinstalledBoxes_Windows10Preinstalled' -var 'video_capture_path=D:\BuildAgent\temp\buildTmp\Agenda_Develop_Staging_MachineImages_PreinstalledBoxes_Windows10Preinstalled\videocapture' agenda-preinstalled.json

Howdy @Occams, I was able to reproduce and have fix in #7496 please tell me if that fixes it for you.

Here's a binary in case : packer_windows_amd64.zip

Hey @azr, unfortunately the proposed fix did not resolve the issue. Logfile regarding the development version is attached.

https://gist.github.com/Occams/888f483e3372cd9cd36a6d0a542eeb4f

Hey @Occams ! ah bummer, building on mac, I had another issue with ovf files, which is not your problem.

Trying on windows, one quick fix for this is to set the checksum type to none in the builder. I'd recommend checksumming for safety though.

"checksum_type": "none",

edit: the error should be better and I am working on it ! -> done in #7503
edit2: it should be okay to not force checksum and I am working on it.

Same on Linux, trying to bypassw ith checksum_type set to "none" i got:

Build 'virtualbox-ovf' errored: Error importing VM: VBoxManage error: 0%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage: error: Appliance read failed
VBoxManage: error: Error reading OVA '/home/mbojko/Documents/packer/vb-packer/packer_cache/1cdfac7542472699ee45e9622ed625caf4aed577.ova' (VERR_TAR_BAD_CHKSUM_FIELD)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 328 of file VBoxManageAppliance.cpp

Hey @marcinbojko ! I'm sorry to hear that and it's weird because worked for me with my alpine ova file. Are you sure the checksum field is not set ? I'm asking because of that VERR_TAR_BAD_CHKSUM_FIELD.
Please share your buildfile so that I can try to see what's wrong.

hey @azr, thanks for info. I've switched to 1.3.5. built new 1803 server image and now I am trying to replicate this into 1.4.0 on clean env. I'll share builds as soon as possible, thanks again.

Hi @azr - same result.
So first stage is base stage - this goes smoothly.
https://gist.github.com/marcinbojko/88d02f07412a7699ab8f7be5019846e2

Second stage, starting from import from base stage fails:
https://gist.github.com/marcinbojko/9312ccb4fd9f59a713457722a34d4369

Template validated successfully.
virtualbox-ovf output will be in this color.

==> virtualbox-ovf: Creating ephemeral key pair for SSH communicator...
==> virtualbox-ovf: Created ephemeral SSH key pair for communicator
==> virtualbox-ovf: Retrieving OVF/OVA
==> virtualbox-ovf: Trying ./output-1803-base/vbox-1803-base.ovf
==> virtualbox-ovf: Trying ./output-1803-base/vbox-1803-base.ovf
==> virtualbox-ovf: ./output-1803-base/vbox-1803-base.ovf => /home/mbojko/Documents/packer/vb-packer/packer_cache/1cdfac7542472699ee45e9622ed625caf4aed577.ova
==> virtualbox-ovf: leaving retrieve loop for OVF/OVA
==> virtualbox-ovf: Importing VM: /home/mbojko/Documents/packer/vb-packer/packer_cache/1cdfac7542472699ee45e9622ed625caf4aed577.ova
==> virtualbox-ovf: Error importing VM: VBoxManage error: 0%...
==> virtualbox-ovf: Progress state: VBOX_E_IPRT_ERROR
==> virtualbox-ovf: VBoxManage: error: Appliance read failed
==> virtualbox-ovf: VBoxManage: error: Error reading OVA '/home/mbojko/Documents/packer/vb-packer/packer_cache/1cdfac7542472699ee45e9622ed625caf4aed577.ova' (VERR_TAR_BAD_CHKSUM_FIELD)
==> virtualbox-ovf: VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component ApplianceWrap, interface IAppliance
==> virtualbox-ovf: VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 328 of file VBoxManageAppliance.cpp
==> virtualbox-ovf: Deleting output directory...
Build 'virtualbox-ovf' errored: Error importing VM: VBoxManage error: 0%...
Progress state: VBOX_E_IPRT_ERROR
VBoxManage: error: Appliance read failed
VBoxManage: error: Error reading OVA '/home/mbojko/Documents/packer/vb-packer/packer_cache/1cdfac7542472699ee45e9622ed625caf4aed577.ova' (VERR_TAR_BAD_CHKSUM_FIELD)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at line 328 of file VBoxManageAppliance.cpp

Hey @marcinbojko, do you still have the issue trying with one of those binaries ?

darwin_amd64.zip
linux_amd64.zip
windows_amd64.zip

Sir, no sir! All is good/all is green.... for now ;)
Thanks!

Awesome ! Your issue was the one I had too and that got fixed in ~#7496~ https://github.com/hashicorp/packer/pull/7497. Thanks for confirming ! ๐Ÿ™‚

I am doing my part ;) Thanks.

Awesome ! Your issue was the one I had too and that got fixed in #7496. Thanks for confirming ! ๐Ÿ™‚

Hello @azr,

I don't understand this issue's resolution. I'm getting the same errors as above with packer 1.4.0, but not with the (apparently patched) binary you uploaded. You said that this issue "got fixed in #7496", but this ticket is #7496, and there are no commits here.

Edit: OK, I guess you meant #7497. When might we expect a new release of packer with said fix?

@andreild, what is in your Edit: section, yes ! ๐Ÿ™‚ ๐Ÿ‘. Editing my comment there, thanks.

A release with this fix would be much appriciated, ty for your work guys!

Edit:
Upstream 1.4.1 fixes this issue, it was just not packaged yet for my distro, but it is now. Ty again.

Official version 1.4.1 behaves the same - IP is being substituted by "false"

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