Using the xHCI and the storage USB controller under EFI

Discussions about using Linux guests in VirtualBox.
Post Reply
antonjo
Posts: 14
Joined: 26. Feb 2012, 08:38
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Mostly win 7 64

Using the xHCI and the storage USB controller under EFI

Post by antonjo »

Based on my attempts on a Linux host and VB 6.1, the following settings are in conflict and cause boot aborting:

1. System > Enable EFI
2. Storage > USB Controller with an optical drive or hard disk attached
3. USB > Enable USB 3.0 (xHCI) Controller


As for 1, using legacy BIOS allows the VM to boot.

As for 2, if the USB Controller is empty, the VM boots, and then it is possible to attach online the hard disk or the ISO.

As for 3, both USB 1.1 and 2.0 options allows the VM to boot.

The boot fails early, i.e. you cannot enter the EFI firmware with the ESC key.


Can you tell me if this is the intended behaviour, or anyway if this is the same for you?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Using the xHCI and the storage USB controller under EFI

Post by scottgus1 »

#1: EFI only works for certain OS's, please see https://www.virtualbox.org/manual/ch03.html#efi

#2: Good question. I usually leave the VM's Optical Drive on the SATA or IDE port where Virtualbox places it by default. I'm not sure what the rationale for taking the drive and attaching it to a USB controller would be. EFI is required for booting from USB. Legacy BIOS cannot boot from USB.

#3 There may be a new bug in USB 3 in 6.1.36. Try if your boot-from-USB-via-EFI-BIOS works under USB 3 in 6.1.34 (don't forget to switch the Extension Pack too.)

If the setup in #2 is being tried because the host's CD drive connects to a host USB port, such a configuration is not necessary. The host can send its CD drive into the VM through the default SATA- or IDE-connected Optical Drive. There is no need to duplicate host hardware in the VM.
antonjo wrote:you cannot enter the EFI firmware with the ESC key.
If the bootup misses the ESC key window and you get to the EFI shell, the boot menu can be accessed by running 'exit' at the EFI shell.
antonjo
Posts: 14
Joined: 26. Feb 2012, 08:38
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Mostly win 7 64

Re: Using the xHCI and the storage USB controller under EFI

Post by antonjo »

@scottgus1

To clarify my use case. I am making a custom (unattended) Windows 11 image for a bootable pendrive.
To this end, I do not strictly need a virtual USB disk. At boot, when developing the image, whether I select a standard or a USB interface doesn't make a huge difference. Once the solution is ready for production, I attach a physical USB disk and clone the virtual one and test the real device boot.

Also, I do not need a USB 3 interface for this project. I just found this problem and I thought to ask.

As regards entering the firmware with the ESC key, to the scope of this question, it is for just reproducibility. In fact, to fast reproduce the issue, you can just attach an empty virtual USB drive, of course you can't do anything other than entering the firmware with ESC. If the xHCI USB is off, you can, while the system just aborts immediately when on. If you disable EFI and switch to legacy BIOS, you can again enter the boot menu with F12 (despite xHCI USB on).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Using the xHCI and the storage USB controller under EFI

Post by fth0 »

This issue should be fixed in the VirtualBox test builds 6.1.39r153816 and newer.
Post Reply