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 Optical Drive not created as master in EFI mode #7081

Closed
koaps opened this issue Dec 7, 2018 · 7 comments · Fixed by #8400
Closed

VirtualBox Optical Drive not created as master in EFI mode #7081

koaps opened this issue Dec 7, 2018 · 7 comments · Fixed by #8400

Comments

@koaps
Copy link

koaps commented Dec 7, 2018

  • Packer version: 1.3.2
  • VirtualBox Version 5.2.22 r126460 (Qt5.6.3)
  • Host platform: macOS Mojave v10.14.1

When creating an EFI enabled VM, the optical drive isn't set to master (primary or secondary), this prevents the mounted ISO from being loaded and failing into the EFI shell.

The Optical drive should be an IDE secondary master, VirtualBox does this by default when creating a VM manually.

@breisig
Copy link

breisig commented Nov 1, 2019

Getting the same issue. Virtualbox ISO cd does not load unless it was set to IDE secondary master for me in EFI mode.

@SwampDragons
Copy link
Contributor

Do either of you have a template for reproducing? It'll be way faster for me to get a patch in if I know how you're configuring this.

@breisig
Copy link

breisig commented Nov 1, 2019

I got abit closer now to make Virtualbox in EFI mode boot an ISO. Since I didn't know how to modify the existing "IDE Controller" that the ISO file used to change the port, I had to modify my packer file to add a new IDE controller as type IDE primary master and manually attach the ISO that way under "vboxmanage" .

    "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--firmware", "EFI" ],
        [ "storageattach", "{{.Name}}", "--storagectl", "IDE Controller", "--port", "0", "--device", "0", "--type", "dvddrive", "--medium", "C:\centos8.iso"],
    ]

Of course, It would be better to be able to modify the port/device of the IDE Controller from within packer instead of me creating a new device.

@SwampDragons
Copy link
Contributor

Definitely. We have a fairly primitive driver for attaching disks; I won't get a chance to before the 1.4.5 release but adding more direct ability to control the storagectl commands could be something we aim for in the 1.5 release.

@SwampDragons SwampDragons added this to the 1.5.0 milestone Nov 1, 2019
@breisig
Copy link

breisig commented Nov 4, 2019

ok, I finally got an ISO working in EFI mode without having to modify/attach another IDE device. All I had to do is force the iso_interface to be setup as a SATA drive instead of the default IDE mode by adding the following to my packer config.

      "iso_interface": "sata",
      "vboxmanage": [
        [ "modifyvm", "{{.Name}}", "--firmware", "EFI" ]
      ]

This will allow the ISO to be bootable.

@SwampDragons
Copy link
Contributor

Awesome. So sounds like we have some work to do around making sure we set reasonable defaults, and add lots of documentation.

@azr azr closed this as completed in #8400 Nov 22, 2019
azr pushed a commit that referenced this issue Nov 22, 2019
Document what needs to happen if you're launching an efi vm.

Closes #7081
@ghost
Copy link

ghost commented Jan 23, 2020

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.

@ghost ghost locked and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants