You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to create a Windows 10 VM fails with "FATAL: Could not read from the boot medium! System halted." When looking at the hardware configuration in the Virtualbox UI, it appears the VboxAdditions ISO gets added with a lower ID than the Windows ISO which results in a higher "boot priority" in the DVD category, and so Virtualbox tries to boot from a non-OS ISO and fails, hanging the build.
Switching the type to upload allows it to proceed but takes FOREVER and I've had it intermittently fail for no apparent reason.
I wondered if perhaps setting the tools interface to IDE could work around the issue, or enabling EFI boot instead. I tried both, and it turns out the "fix" is to set the iso_interface to ide and leave the guest_additions_interface as the default (which the docs say is ide, but actually appears to be sata), because IDE apparently gets priority over sata in the boot order evaluation so the Windows ISO boots successfully. This fix also allows EFI to boot properly, where without the workaround you got a slightly less scary EFI prompt instead of the FATAL error message, but if you watched closely, it does actually prompt to "press any key to boot from DVD" where for non-EFI aka BIOS mode you never get that prompt, but interacting with the VM to launch the boot defeats the purpose of Packer's automated process.
Recorded this issue and this workaround in the chef/bento repository I was using when I discovered the issue. chef/bento#1370
Added guest_additions_interface: sata
It appears that the guest additions gets added as a "secondary device" if left to the default IDE, whether that is an additional IDE bus or just as a slave while the OS ISO is master, it fails to boot in EFI mode but oddly not BIOS mode because it is "port 0" and the OS ISO is "port 1" and Virtualbox's BIOS/EFI implementation doesn't attempt additional devices automatically (or in EFI requires a user keypress).
Overview of the Issue
Trying to create a Windows 10 VM fails with "FATAL: Could not read from the boot medium! System halted." When looking at the hardware configuration in the Virtualbox UI, it appears the VboxAdditions ISO gets added with a lower ID than the Windows ISO which results in a higher "boot priority" in the DVD category, and so Virtualbox tries to boot from a non-OS ISO and fails, hanging the build.
Switching the type to upload allows it to proceed but takes FOREVER and I've had it intermittently fail for no apparent reason.
I wondered if perhaps setting the tools interface to IDE could work around the issue, or enabling EFI boot instead. I tried both, and it turns out the "fix" is to set the
iso_interface
to ide and leave theguest_additions_interface
as the default (which the docs say is ide, but actually appears to be sata), because IDE apparently gets priority over sata in the boot order evaluation so the Windows ISO boots successfully. This fix also allows EFI to boot properly, where without the workaround you got a slightly less scary EFI prompt instead of the FATAL error message, but if you watched closely, it does actually prompt to "press any key to boot from DVD" where for non-EFI aka BIOS mode you never get that prompt, but interacting with the VM to launch the boot defeats the purpose of Packer's automated process.Recorded this issue and this workaround in the chef/bento repository I was using when I discovered the issue.
chef/bento#1370
Reproduction Steps
Functional workaround
https://github.com/chef/bento/blob/252830cfe3a38ed5ba217464c1209625b9a3691c/packer_templates/windows/windows-10.json#L32-L40
Changed
iso_interface: ide
Added
guest_additions_interface: sata
It appears that the guest additions gets added as a "secondary device" if left to the default IDE, whether that is an additional IDE bus or just as a slave while the OS ISO is master, it fails to boot in EFI mode but oddly not BIOS mode because it is "port 0" and the OS ISO is "port 1" and Virtualbox's BIOS/EFI implementation doesn't attempt additional devices automatically (or in EFI requires a user keypress).
Plugin and Packer version
1.7.4
Simplified Packer Buildfile
https://github.com/chef/bento/blob/252830cfe3a38ed5ba217464c1209625b9a3691c/packer_templates/windows/windows-10.json
Operating system and Environment details
macOS 11.5.1 host
Virtualbox 6.1.26
Log Fragments and crash.log files
BIOS with guest as IDE and OS ISO as ide
Succeeds (usually)
OS ISO as sata, guest additions as sata, FAILS.
OS ISO as sata, guest additions as default IDE FAILS.
EFI with guest as IDE and OS ISO as ide or sata, FAILS.
The text was updated successfully, but these errors were encountered: