Page 1 of 1

What are .nvram files in Snapshots?

Posted: 5. Dec 2020, 18:22
by Paddy Landau
Every time I take a snapshot, VirtualBox creates a new .nvram file in the VM's subfolder Snapshots. VirtualBox doesn't delete old ones, so the .nvram files just sit there, accumulating. They're quite small, at exactly 528KiB each.

Example:
2020-12-05T15-26-47-666117000Z.nvram
I have found that I can delete these files without any impact on the VM.

What are these files, why are they created, and what's their point if I can delete them without affecting the VM?

More information:
  • Host: Linux Ubuntu 20.04
  • Guest: Windows 10
  • VirtualBox version 6.1.16 r140961 (Qt5.12.8)

Re: What are .nvram files in Snapshots?

Posted: 5. Dec 2020, 22:46
by fth0
Paddy Landau wrote:What are these files, why are they created, and what's their point if I can delete them without affecting the VM?
On a physical PC, the (U)EFI BIOS saves its settings in a special memory whose type is called NVRAM (non-volatile RAM). Consequently, VirtualBox saves the settings of its EFI BIOS in a .nvram file. When you create a snapshot, the .nvram file is copied, and when you restore the snapshot, it's copied back and the copy is usually deleted. So far, so good. There seem to be conditions under which .nvram and .sav files are not deleted, but I don't know the reason. You can search the contents of the .vbox file for the .nvram files you should keep.

Re: What are .nvram files in Snapshots?

Posted: 6. Dec 2020, 11:16
by Paddy Landau
fth0 wrote:On a physical PC…
I wasn't quite sure what you meant by "On a physical PC", but my PC is a physical one (what other kind to you get?).

Your advice was helpful; I know what to do now! Thank you :)

Re: What are .nvram files in Snapshots?

Posted: 6. Dec 2020, 13:17
by fth0
Paddy Landau wrote: wasn't quite sure what you meant by "On a physical PC", but my PC is a physical one (what other kind to you get?).
A virtual PC? ;) Physical PC vs. virtual PC, physical machine vs. virtual machine, physical server vs virtual server, ...

The PC and the VM each have their own BIOS, and each can be an (U)EFI BIOS or a legacy BIOS, independently of each other.

Re: What are .nvram files in Snapshots?

Posted: 6. Dec 2020, 13:28
by Paddy Landau
Thanks. Running a VM on a virtual PC seems kinda weird, but thinking about it, I realise that there could be valid uses for this, such as on a virtual server.

My PC is a physical one, and I have EFI enabled on both the host and the guest.

Re: What are .nvram files in Snapshots?

Posted: 6. Dec 2020, 13:45
by fth0
I just meant to convey the idea that whereas a physical PC/machine has physical memory for storing its (U)EFI BIOS settings, the virtual machine/PC has to use virtual memory (= disk file on the host) for that.

Re: What are .nvram files in Snapshots?

Posted: 6. Dec 2020, 13:51
by Paddy Landau
fth0 wrote:I just meant to convey the idea that whereas a physical PC/machine has physical memory for storing its (U)EFI BIOS settings, the virtual machine/PC has to use virtual memory (= disk file on the host) for that.
Ah, I understand now! Thanks again.