Skip to content

Commit 2d806b4

Browse files
committed
Fix missing NVRAM file when creating new VM with EFI
When a new VM with EFI set by default was created, NVRAM file was not initialized. As the result, settings became inaccessible, the following error message was displayed: "The UEFI NVRAM file is not existing for this machine". Fixed #364.
1 parent 5cedb6c commit 2d806b4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

endpoints/lib/vboxconnector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3859,6 +3859,9 @@ public function remote_machineCreate($args) {
38593859

38603860
// Save and register
38613861
$m->saveSettings();
3862+
if((string)$m->FirmwareSettings->firmwareType == 'EFI') {
3863+
$m->nonVolatileStore->initUefiVariableStore(0);
3864+
}
38623865
$this->vbox->registerMachine($m->handle);
38633866
$vm = $m->id;
38643867
$m->releaseRemote();

0 commit comments

Comments
 (0)