I am wondering, what will happen to data in RAM memory after VM is shutdown?

Since the hosting server is still running and RAM is still powered, I believe that the data will stay there until they will be override by other VM/program, right? Or do you know if the implementations of virtualization software are guaranteeing that the memory will be erased? If so which one? Or in case storing some sensitive data I should make sure that before shutting down the VM all data on RAM are overridden?

  • Host OS will reclaim the memory and zero it out. It is no different from any other program shutdown. – user364455 Dec 17 '15 at 11:04
  • That's a pretty good question. I think it boils down to "can you perform a cold boot attack on a VM". – gronostaj Dec 17 '15 at 11:47
  • 1
    Interesting to mention the cold boot attack, however the allocated RAM space is wiped before it is given back to the host machine. @gronostaj – user518951 Dec 17 '15 at 12:43

Which visualization system are you using or interested in? In general, when you power on a VM, it consumes the RAM you allocated to it in the settings. After you shut it down, that RAM space becomes free and is restitued back to the host machine.

From Configuring virtual machines:

This sets the amount of RAM that is allocated and given to the VM when it is running. The specified amount of memory will be requested from the host operating system, so it must be available or made available as free memory on the host when attempting to start the VM and will not be available to the host while the VM is running

Suppose your host and virtual machines and network are safe, you have to remember that the data you save in your VM is still present on the host machine hard disk after you shut it down.


The ram would normally be "released" back to the OS, to do with as it pleases, be marked "free" or "available" or otherwise used again.

I believe VM's like VirtualBox can "save" the ram and use it to start up again with all the same programs running, like a regular computer's suspend or hibernate - saves ram to disk and turns off power, then reloads ram from disk and continues as if it was never turned off.

Or are you concerned that data in the VM's ram might still be sitting there in memory, and sensitive data could be read by some other rogue program running on your computer? That is a possibility but in that case, I'm sure any rogue program already running on your computer could read the screen & keyboard & mouse inputs, listen to the network traffic, and basically do anything already, VM or no VM. I wouldn't worry about it - I would worry about all the rogue spyware that's running on my computer though

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.