Thursday, July 25, 2013

The forgotten BIN element in Hyper-V Storage planning

This is an issue that VDI deployments always run in to.

The symptom is this:  I deployed bunches of VDI VMs.  Folks begin using them.  And a week goes by.  Suddenly I notice that most all the reserve storage that I had planned on is gone. 

I don’t have any snapshots happening.  I check that the backup software isn’t leaving weird VSS backups or temporary files lying around.  I even look for AVHDs (though I know there should not be any).

So what happened?

I go looking around and I see all these .BIN and .VSV files.

The VSV is a small placeholder.

However, the BIN is equal in size to the amount of RAM that the running VM is consuming.  If you have Dynamic Memory enabled, it equals the amount of Assigned Memory – so it changes.

Therefore, Dynamic Memory on, means that you design for the worst case scenario – calculate for the Maximum Memory setting of all the VMs stored on that particular LUN.

What this will cause you to do is:

  1. Realize the impact that this BIN file has on storage.
  2. Be smart about setting the Maximum Memory of your VMs.
  3. Understand the risk and accept the risk and push forward without making any considerations.

If you have read this far you might be thinking, What is this BIN file for anyway?

It is a safety net for your VM(s).

It is a placeholder that reserves storage on the file system, so that if the hypervisor needs to reboot, it can quickly dump the memory of your VM(s) to disk.

This does not help you if the hypervisor crashes due to something like a bad driver, this is Hyper-V being able to respond to something and save your VMs – Oh, such as when you run out of storage and it puts your VMs into a saved state.  That is one use.

2 comments:

Tim said...

Sadly, this is the most ridiculous way to perform a safety net! Why doesn't hyper-v (or better, the OS) ask if there is enough space to dumb the memory, and if it the answer is no, then it either halts the shutdown process and display notice, or it forces a turn off.

If MSFT were to clarify when you setup an instance that hyper-v needs "saving" space equal to the amount of RAM, then most admins will plan for that ahead of time.

I just see it wasteful because though I like to save state all my VMs. I do hate to see this big 8GB and 16GB file that needs to be backed up every single day when I do perform hyper-v server backup. Multiply that by 20 instances, and you get the drift.

BrianEh said...

why would you back them up?
And, this is not new, it is in the design and planning guides, it has been there since 2008.
and no, you are right, it is not for crashes, you cannot protect from a crash - but it does make rebooting a host considerably faster.
I am not defending it