none
VMRS Files RRS feed

  • Question

  • Hi,

    We plan to use hyper v (on Windows Srv 2016) guests to run SSAS tabular model DBs with lots of memory but the VMRS file for the guest with big memory allocated becomes a storage problem: it grows as the memory grows. We are testing this on a hyper v cluster; we calculated storage for DW (from which SSAS reads). But the VMRS files for guests keeps getting bigger. Assuming to utilize ~700 GB of memory we will need 700+GB of disk space and i could not find it mentioned on Windows Server 2016 docs (neither in hyper v or planning sections). Dynamic or static memory does not effect the problem; you have to tax your storage with the amount of memory you provide to the guest.

    The question is: is there a way to safely disable VMRS file for hyper v guests in Windows Server 2016; i do not want to allocate disk space for the memory i provide to the guest.

    Saturday, February 11, 2017 9:38 PM

Answers

  • The question is: is there a way to safely disable VMRS file for hyper v guests in Windows Server 2016; i do not want to allocate disk space for the memory i provide to the guest.

    I think you misinterpreted the answer provided by TheOnlyWizard, because the answer is 'yes'.   Configure your VMs to not save state upon host shutdown.  That configuration will not allocate any disk space for memory provided to the guest.


    . : | : . : | : . tim


    • Edited by Tim CerlingMVP Thursday, February 16, 2017 1:35 PM
    • Marked as answer by AhmetKuru Monday, February 20, 2017 9:00 AM
    Thursday, February 16, 2017 1:33 PM

All replies

  • As far as I understand Hyper-V, 2012R2 .BIN files and 2016 VMRS-files are sparse-files, meaning they don''t take up any actual storage unless utilized. (Utilized meaning: You save the VM for example)...
    Sunday, February 12, 2017 6:06 PM
  • not sure about 2012R2 but in 2016 it seems to "eat" disk while running:

    this is the VMRS file for selected VM:

    VMRS file on disk, size 364 GB

    this is the VM; running:

    VM running with 364 GB memory

    For 1.5 TB memory on 2 clustered hosts, i need arrange 1.5 TB on SAN storage which i do not want.. 


    • Edited by AhmetKuru Monday, February 13, 2017 1:46 PM typo
    Monday, February 13, 2017 12:33 PM
  • As I said, the space doesn't actually get taken up, unless you save the VM. So, to be able to keep a working VM in case something goes terribly wrong, you DO need to take that space being actually allocated into account from the start. If that's not what you want, well, that's how Hyper-V does it's thing. You're only option then would be to look for a different Hypervisor which does things differently (VMWare for example, although with that you get swapdisk-space to take into account)...
    You can set the clustered VM to shutdown instead of saving it, and you can NOT ever save the VM yourself but shut it down instead, and you can make sure to never use a "Quick migration" (which would save the VM) to prevent that space from ever getting allocated, but then still. In case the cluster somehow decides to go save the VM nevertheless, the space will get allocated, for the amount of the actual current Memory Demand + a little overhead. <- in your case, it looks like the VM will be using most of that 1.5 Tbytes of memory, so it would then save that amount, and so you HAVE to take that allocation into account for emergencies at least...

    Simply put: If your VM uses 700 Gbytes of Memory, even you have set it at 1.5 Tbytes of Memory total, then saving the VM would give you a VMRS-file of a little over 700 Gbytes. From VM start until save, the file gets created at start, but does NOT actually get allocated. It will roughly show the size of the current Memory Demand, not the amount of memory set. So if your VM starts using less, say you stop all the DBs inside the VM, your memory demand drops, and so would the size of this file. You can test that if you literally do that. Give the VM 700 Gbytes of mem. start it up, see the VMRS-file being created for 700 Gbytes. Then, stop the DBs, make the VM just use a little, say, 2Gbytes of mem., then save the VM. You'll see that when the save is done, the VMRS-file all of a sudden will be around 2Gbytes in size. Then, when you restore the VM, it will show to be 700 Gbytes again all of a sudden (But in reality on the storage, only 2 Gbytes is actually allocated so far)...


    • Edited by TheOnlyWizard18 Monday, February 13, 2017 6:27 PM
    • Proposed as answer by Leo HanModerator Thursday, February 16, 2017 5:44 AM
    • Unproposed as answer by AhmetKuru Thursday, February 16, 2017 8:59 AM
    Monday, February 13, 2017 6:20 PM
  • Thanks for the detailed information, wish these were mentioned in the docs.

    Would be nice to have the option though: not saving a VM (and be able to just live migrate) if VM fails just stop/start. Could be useful for read-heavy work loads.

    Anyhow, if anyone from product team reads along please update the docs first, consider this option also.

    Tuesday, February 14, 2017 1:10 PM
  • Hi,

    You could post feedback to the following site. Microsoft engineering teams would monitor the feedbacks and may improve the products.

    https://windowsserver.uservoice.com/forums/295047-general-feedback

    Best Regards,

    Leo


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, February 16, 2017 5:44 AM
    Moderator
  • hi,

    i posted feedback to user voice: https://windowsserver.uservoice.com/forums/295050-virtualization/suggestions/18325258-vmrs

    question in this thread is still not answered, most probably the short answer will be "no". the information provided by TheOnlyWizard18 explains the reasons for "no" and should already be available in docs.

    if happens, i would like to post a "yes" version here.


    • Edited by AhmetKuru Thursday, February 16, 2017 9:18 AM
    Thursday, February 16, 2017 9:09 AM
  • The question is: is there a way to safely disable VMRS file for hyper v guests in Windows Server 2016; i do not want to allocate disk space for the memory i provide to the guest.

    I think you misinterpreted the answer provided by TheOnlyWizard, because the answer is 'yes'.   Configure your VMs to not save state upon host shutdown.  That configuration will not allocate any disk space for memory provided to the guest.


    . : | : . : | : . tim


    • Edited by Tim CerlingMVP Thursday, February 16, 2017 1:35 PM
    • Marked as answer by AhmetKuru Monday, February 20, 2017 9:00 AM
    Thursday, February 16, 2017 1:33 PM
  • It is already an old thread, but since we are looking into the same question I am digging it up again. 

    I think configuring the VM to not save state would not necessarily be "safely". In case of a database server for example there would be the risk of getting inconsistent databases (when a server goes down unplanned).  

    Or am I mistaken in seeing this risk? 

    Friday, June 29, 2018 12:08 PM
  • When a server goes down unexpectedly, you will not be depending upon the ability of the hypervisor to save the state of a all its VMs.  You will be depending upon the application running in the VM.  Generally when you state that you experience an 'unexpected shutdown', that means the system crashed or lost power.  In these situations, the hypervisor does not have time to save the state of any VM and all its VMs crash, too.  That is why applications like SQL have their own built-in recovery logic to handle crash/powerfail events.

    tim

    Friday, June 29, 2018 1:07 PM
  • Thank you for the reply! 
    Tuesday, July 3, 2018 6:55 AM