What happens to data in RAM after VM is shutdown?

4

1

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?

AuHau

Posted 2015-12-17T10:51:21.420

Reputation: 41

Host OS will reclaim the memory and zero it out. It is no different from any other program shutdown. – user364455 – 2015-12-17T11:04:32.457

That's a pretty good question. I think it boils down to "can you perform a cold boot attack on a VM".

– gronostaj – 2015-12-17T11:47:39.443

1Interesting to mention the cold boot attack, however the allocated RAM space is wiped before it is given back to the host machine. @gronostaj – None – 2015-12-17T12:43:34.270

Answers

1

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.

user518951

Posted 2015-12-17T10:51:21.420

Reputation:

0

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

Xen2050

Posted 2015-12-17T10:51:21.420

Reputation: 12 097