VirtualBox

Opened 4 years ago

Last modified 3 years ago

#19176 reopened defect

VirtualBox 6.1: Can't attach Nvram Storage driver (VERR_PDM_DRIVER_NOT_FOUND)

Reported by: Jack_Smith Owned by:
Component: EFI Version: VirtualBox 6.1.0
Keywords: nvram efi Cc:
Guest type: all Host type: all

Description

Setting any NVRAM variables (VBoxInternal/Devices/efi/0/LUN#0/Config/Vars/) results in the error Can't attach Nvram Storage driver (VERR_PDM_CFG_MISSING_DRIVER_NAME)

Setting the driver name as it was in VirtualBox 6.0 and earlier (VBoxManage setextradata VMname 'VBoxInternal/Devices/efi/0/LUN#0/Driver' 'NvramStorage') results in the error Can't attach Nvram Storage driver (VERR_PDM_DRIVER_NOT_FOUND).

VirtualBox 6.0 powers on the VM fine, 6.1 doesn't power on with the above errors.

Attachments (1)

test.vbox (3.6 KB ) - added by Jack_Smith 4 years ago.
virtual machine that doesn't power up because of NVRAM variables

Download all attachments as: .zip

Change History (10)

by Jack_Smith, 4 years ago

Attachment: test.vbox added

virtual machine that doesn't power up because of NVRAM variables

comment:2 by aeichner, 4 years ago

Resolution: invalid
Status: newclosed

Remove the following extra data item from your VM config and the VM should boot fine again:

<ExtraDataItem name="VBoxInternal/Devices/efi/0/LUN#0/Driver" value="NvramStorage"/>

The EFI support has proper NVRAM handling now.

comment:3 by Jack_Smith, 4 years ago

Resolution: invalid
Status: closedreopened

eichner wrote:

Remove the following extra data item from your VM config and the VM should boot fine again:

<ExtraDataItem name="VBoxInternal/Devices/efi/0/LUN#0/Driver" value="NvramStorage"/>

The EFI support has proper NVRAM handling now.

You closed the bug as invalid but passing NVRAM variables to the virtual machine is not invalid.

There is no documentation for the "proper NVRAM handling", there is no documentation for passing NVRAM variables to the virtual machine in VirtualBox 6.1.

Passing an NVRAM variable in VirtualBox 6.0 and lower is done by creating an item in VBoxInternal/Devices/efi/0/LUN#0/Config/Vars with a Name, Value, and Uuid. The bug is about either the lack of documentation about how to do it in 6.1 or the lack of a method to do it.

Nvram.cpp described VBoxInternal/Devices/efi/0/LUN#0/Config/Vars/ as the root node for passing NVRAM variables. What is the method for passing NVRAM variables on 6.1? If the only method is providing a binary NVRAM file this should be specified in the documentation.

Last edited 4 years ago by Jack_Smith (previous) (diff)

comment:4 by Jack_Smith, 4 years ago

Anyone reaching here through Google and wondering how to pass NVRAM variables to VirtualBox VMs: the EFI shell has a command called dmpstore which is capable of loading binary files with NVRAM variables. Both the old, convenient VBoxManage method and the "proper" EFI Internal Shell binary method are not properly documented.

comment:5 by Benus, 4 years ago

The uefishell's setvar command details can be found at the specification, at page 191:

https://uefi.org/sites/default/files/resources/UEFI_Shell_Spec_2_0.pdf

Or by typing this command at uefishell:

fs0:/>setvar -? -b

or

fs0:/>help setvar

Deppending on the shell version being used

comment:6 by Jack_Smith, 4 years ago

Thanks Benus. setvar only works on preexisting variables. I don't know if that's by design or not, or if it's just a VirtualBox quirk. Only dmpstore can create NVRAM variables in VirtualBox.

comment:7 by aeichner, 4 years ago

The old way of handling NVRAM variables was not documented either and the solution was next to unusable before 6.1 where the NVRAM storage is done like it is on real hardware. There you have to use the EFI shell or the operating system to change EFI variables as well. I know that for a virtual machine there might be more convenient ways to modify the NVRAM but we focused on getting the basics working for 6.1. Sorry that it bit you, the invalid resolution was set because you used extra data to modify the VM settings which broke starting your VM. Extradata configs are not guaranteed to work across releases and because we ditched the old code the driver was removed as well. Please note that EFI support is still marked as an experimental feature in the manual so there can be some hiccups from time to time. We are in the process of ironing them out (which includes some work in the documentation area) but this will still take some time. Regarding the setvar/dmpstore quirk, our EFI is based off of the EDK2 sources so this behavior should be there by design.

comment:8 by Jack_Smith, 4 years ago

Thank you. This should be documented somewhere. I suppose that now it's documented here...

comment:9 by Graham Perrin, 3 years ago

Cc: grahamperrin

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use