13

Currently I am experimenting with hiberfil.sys file on Windows 7 and to not break my major system, I decided to install Windows 7 in VirtualBox. As turned out, hibernation is disabled and cannot be enabled in guest system; it says that hibernation is not supported by hardware or something like that.

Has anybody met this problem before? Any way to enable hibernation in VirtualBox?

4
  • Hibernation is supported by hardware. Its unlikely this is something that would be virtualized.
    – Ramhound
    May 7, 2014 at 17:59
  • @Ramhound: Not necessarily. I think in the APM days the BIOS used to do most of the work, but nowadays, the important part – saving/restoring the RAM image – is implemented by Windows NT and Linux entirely within the OS. I don't think there are major differences between going to S4 (Suspend to Disk) vs just powering off the computer. May 7, 2014 at 19:37
  • why would you want to hibernate a virtual machine?
    – Keltari
    Oct 3, 2015 at 4:36
  • As I said - I was experimenting with hiberfil.sys (wanted to move this file to another drive, but as turned out, it's probably impossible).
    – Signum
    Oct 3, 2015 at 7:38

1 Answer 1

17

VirtualBox, unfortunately, does not support features that would allow guest OS to sleep or hibernate. So there is no way to enable hibernation in the guest Windows system.

But unless you specifically need to use the hibernation in the guest system (e.g. for testing), there's really no need for that as VirtualBox itself has the similar feature. Read below for details.


If someone is looking for the same effect but without the need to actually use the Windows hibernation, VirtualBox has a feature called Save the machine state. It simply freezes the guest system and saves RAM and VM state to the disk. It's done by VirtualBox, not Windows. When the guest system is started again and its state is restored, it won't even notice it has been interrupted.

You can trigger it by simply clicking on VM window's close button, selecting Save the machine state and confirming with OK. Or open VM's context menu in VirtualBox, open Close submenu and select Save state. It has also keyboard shortcut, in VirtualBox window it's Ctrl + V and in VM's window it's Host key + Q.

This should work with any guest system theoretically, even if it itself doesn't support the hibernation.

You can also check the section 1.8.6. Saving the state of the machine of VirtualBox's user manual.

5
  • 3
    This doesn’t answer the question. The original poster clearly states, “Currently I am experimenting with hiberfil.sys file on Windows 7 and to not break my major system, I decided to install Windows 7 in VirtualBox.” So the original poster does not seek to save a machine’s state as much as they wish to experiment with tweaking the hiberfil.sys file on Windows 7 running in a Virtual Machine so as not to blow up their main Windows 7 machine. Oct 3, 2015 at 3:05
  • @JakeGould I don't think so. The question is "Any way to enable hibernation in VirtualBox?" and my answer "VirtualBox does not support features that would allow guest OS to sleep or hibernate.". It perfectly answers the question. I don't think it's bad to add other information since it can help others. I ended on this question when I was searching for "Hibernation in Windows 7 guest in VirtualBox". Oct 3, 2015 at 3:11
  • See my comment above, I have explained why I care about hiberfil.sys and not saving machine state.
    – Signum
    Oct 3, 2015 at 7:41
  • 1
    @Signum But you got an answer. It's simply not possible. I put a delimiter between the answer to your question and general answer, so it should be more clear. You shouldn't think about yourself only. I would say that 99 % people who will end here actually don't care about Windows hibernation, they just want to hibernate anyhow. And I don't care about down-votes, if it will help even to single other person, I'll be satisfied. That's the main purpose of this site - to help others. Oct 4, 2015 at 3:13
  • 2
    That's pretty sad if VirtualBox does not support that. For example, I wanted to test application behavior when receiving WM_POWERBROADCAST message (for capturing sleep/resume events) on different Windows versions...That would be useful. Dec 21, 2016 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .