Skip to content

Packer 1.8.0, virtualbox-ovf and started having issues about ' Download failed expected a single file, got multiple' #11631

@breisig

Description

@breisig

Overview of the Issue

I have just upgraded from Packer 1.7.10 to 1.8.0 [Under Windows 11] and immediately, I am having issues trying to provision a VM. I am using the virtualbox-ovf in my builds where after upgrading, it says

=> virtualbox-ovf: Retrieving Guest additions
==> virtualbox-ovf: Trying C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: Trying file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso => C:/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: Retrieving OVF/OVA
==> virtualbox-ovf: Trying ./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: Trying ./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: Download failed expected a single file, got multiple: C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: error downloading OVF/OVA: [expected a single file, got multiple: C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova]
==> virtualbox-ovf: Deleting output directory...
Build 'virtualbox-ovf' errored after 116 milliseconds 52 microseconds: error downloading OVF/OVA: [expected a single file, got multiple: C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova]

==> Wait completed after 116 milliseconds 52 microseconds

==> Some builds didn't complete successfully and had errors:
--> virtualbox-ovf: error downloading OVF/OVA: [expected a single file, got multiple: C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova]

==> Builds finished but no artifacts were created.

However when I downgrade back to Packer 1.7.10, it works without issue.

==> virtualbox-ovf: Retrieving Guest additions
==> virtualbox-ovf: Trying C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: Trying file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: file://C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso => C:/Program Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-ovf: Retrieving OVF/OVA
==> virtualbox-ovf: Trying ./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: Trying ./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: ./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova => C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: Importing VM: C:/c/source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova
==> virtualbox-ovf: Mounting ISOs...
    virtualbox-ovf: No ISOs to mount; continuing...
==> virtualbox-ovf: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2377)
==> virtualbox-ovf: Executing custom VBoxManage commands...
    virtualbox-ovf: Executing: modifyvm packer-localdevelopment --cableconnected1 on
    virtualbox-ovf: Executing: modifyvm packer-localdevelopment --cableconnected2 on
    virtualbox-ovf: Executing: modifyvm packer-localdevelopment --spec-ctrl on
==> 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: rdp://127.0.0.1:5946

Reproduction Steps

Upgrading from Packer 1.7.10 to 1.8.0

Packer version

1.8.0

Simplified Packer Template

  "builders": [
    {
      "type": "virtualbox-ovf",
      "source_path": "./source_images/rocky-8-baseinstall/rocky-8-baseinstall.ova",
      "headless": true,

Operating system and Environment details

Windows 11 Pro 64bit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions