Bin file left on Hyper-V VM

We have an upgraded Hyper-V cluster from 2012 R2 to 2016 and I wanted to make some more space on the volume that it resides on so I started looking on the settings of the VMs. As I concluded in another blog post there can be a discussion about if we really need the setting of “Save VM state” for the VM´s in a Hyper-V cluster. It is viable to have this setting on VM´s that reside on a standalone host and if doing maintenance it saves the state of the VM during host reboot.

So what is the thing here, well some of the VM´s in this cluster have got their VM version upgraded to 8.0 but some was still on 5.0. If i just check on the SC VMM I could find the VM´s configured with “Save VM” and amount of storage that they consume.

But when checking the storage where the VM reside I noticed that the value above did not match the size. With the following PowerShell I check for the files that have the ending of .bin (2012 r2 and older format) and also .vmrs (that is the 2016+ format)

Apparently some of the VM´s that have been upgraded from 5.0 have their bin file still in the subfolder.

To fix this I did a report of the files and then a delete, as the file is not in use in a 8.0 VM I could do it when it was online

Running the following on your VM´s disable the “SaveVM” and if you then upgrade to VM version 8.0 after that you will not get a duplicate issue 🙂

Happy HyperVing out there