7

I'm running a virtual machine on my windows OS at work, and i have dedicated 1.5 gigs of ram to it, but i'm wondering:

is that ram lost to my windows OS even when i'm not running the virtual machine?

2 Answers2

6

You don't specify which hypervisor you're using, but the general answer is no, if a VM is not running then it does not consume any CPU or RAM resources.

See it for yourself - open your task manager and go to the Performance tab while your VM is running. Then shut down your VM and watch your RAM usage drop.

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • interesting thanks for the help. not quite sure what a hypervisor is ... but i'm using virtualbox. it seemed like it wouldn't be the case, but my professor said that it did use the RAM. maybe he misunderstood my question and thought i was talking about the partition ... –  Sep 01 '10 at 01:35
  • In this case, virtualbox is your hypervisor. Correct the HDD space is still allocated, which is why I did not include it in the answer - it's only CPU and RAM that are not allocated while the machine is shut down. – Mark Henderson Sep 01 '10 at 02:27
3

In general, a VM won't use RAM while the VM isn't "powered on."

It will use RAM when you're not interacting with it, if it is still powered on, and it may be hard to tell the difference in some cases between a VM that you're not connected to and one that's turned off.

Different virtualization systems may or may not use RAM when no VMs are in use. True hypervisors (of which Virtual Box is not one) will use some RAM when the hypervisor is active. If you're sitting at the "host" OS, and you have a hypervisor running, you'll have less RAM available than if you were not running a hypervisor. Hosted VMMs (like Virtual Box, VMWare Server, VMWare Player, Microsoft Virtual PC and Virtual Server) won't use any measurable RAM when no VMs are running.

It's often difficult to tell the difference between a "bare metal" hypervisor like VMWare ESX, Microsoft's HyperV or Xen and a hosted VMM.

Jake Oshins
  • 5,146
  • 18
  • 15