data recovery – How to prevent ruining VirtualBox VMs from abrupt power off of the computer?

I suspended my laptop as usual, while my VirtualBox VM was running (but paused). On power on, I realized that something went wrong with the battery and all of the RAM contents are lost. I had to cold boot the pc.

After boot up, the running (paused) VM had the following issue:

enter image description here

I recovered my VM from the hourly snapshots, so I didn’t lost any data, including the execution state of the VM.

However, if this problem occurs again, I may likely loose all data up to 1 hour. How can I prevent this from happening?

Environment: Debian Bullseye, Kernel 5.19, Btrfs on SSD, Virtualbox 6.1

Read more here: Source link