Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtualbox-iso: NVMe not exporting properly #10

Open
ghost opened this issue Apr 16, 2021 · 0 comments
Open

Virtualbox-iso: NVMe not exporting properly #10

ghost opened this issue Apr 16, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2021

This issue was originally opened by @breisig as hashicorp/packer#8317. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

I am running the latest packer 1.4.5 which now supports running NVMe support in the latest Virtualbox [I am running the latest 6.0.14]. To allow virtualbox to boot an NVMe device, you have force it in EFI mode and set the ISO interface to sata to allow ISO booting in EFI mode using the following config options.

      "hard_drive_interface": "pcie",
      "iso_interface": "sata",
      "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--firmware", "efi" ]
      ]

So it looks like packer sets the NVMe device and my CentOS 8 source can install onto it but it seems when packer is shutting down the virtualbox image and and it tries to export, the following error message occurs.

==> virtualbox-iso: Preparing to export machine...
    virtualbox-iso: Deleting forwarded port mapping for the communicator (SSH, WinRM, etc) (host port 4429)
==> virtualbox-iso: Exporting virtual machine...
    virtualbox-iso: Executing: export centos-8-baseinstall --output source_images\centos-8-source\centos-8-baseinstall.ova
==> virtualbox-iso: Error exporting virtual machine: VBoxManage error: VBoxManage.exe: error: Cannot handle medium attachment: storageBus is 7, channel is 0, device is 0
==> virtualbox-iso: VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MachineWrap, interface IMachine, callee IUnknown
==> virtualbox-iso: VBoxManage.exe: error: Context: "ExportTo(pAppliance, Bstr(pszAbsFilePath).raw(), pVSD.asOutParam())" at line 1343 of file VBoxManageAppliance.cpp
==> virtualbox-iso: Provisioning step had errors: Running the cleanup provisioner, if present...
==> virtualbox-iso: Deregistering and deleting VM...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Error exporting virtual machine: VBoxManage error: VBoxManage.exe: error: Cannot handle medium attachment: storageBus is 7, channel is 0, device is 0
VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "ExportTo(pAppliance, Bstr(pszAbsFilePath).raw(), pVSD.asOutParam())" at line 1343 of file VBoxManageAppliance.cpp

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Error exporting virtual machine: VBoxManage error: VBoxManage.exe: error: Cannot handle medium attachment: storageBus is 7, channel is 0, device is 0
VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "ExportTo(pAppliance, Bstr(pszAbsFilePath).raw(), pVSD.asOutParam())" at line 1343 of file VBoxManageAppliance.cpp

==> Builds finished but no artifacts were created.

This issue doesn't happen when using setting it from pcie -> back to sata mode nd putting it in bios mode.

Operating system and Environment details

  • Windows 10 Pro
  • Virtualbox 6.0.14
  • Packer 1.4.5
  • [Using the latest CentOS 8 iso]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants