Hyper-V VM´s BIN files, to be or not to be in clusters
If you create lots of VM´s with large amount of RAM memory assigned to them and start to wonder why you have used some of the storage on the volumes then this is because if you have set up a VM without changing anything you get a bin file in the VM folder that corresponds to the size of the allocated RAM. This file is used to save the VM`s RAM to disk when the VM is going into saved state!
In an environment where you have all VM´s as clustered resources you will not need to be able to use the saved state when shutdown the host as you will live migrate the VM´s when doing stuff with the HW.
The setting is easily found in Hyper-V Manager for an already deployed VM:
It is not so easily found in System Center VMM when checking the VM properties, but when deploying a new VM you find it in the wizard:
If you want to change the setting for your VM´s running in a cluster via VMM you will have to use PowerShell and it is quite easy to do that with a one-liner, first you see the setting with the PowerShell command Get-SCVirtualMachine and then you can configure it with Set-SCVirtualMachine :
get-scvirtualmachine nametest* | Stop-SCVirtualMachine -Shutdown | Set-SCVirtualMachine -StopAction ShutdownGuestOS | Start-SCVirtualMachine
And now when checking the folder for the VM the BIN file has magically shrunk to 4KB 🙂