VMware vSphere

 View Only
  • 1.  Preventing Space and Snapshot Problems with a Dedicated VM Datastore

    Posted Dec 26, 2024 11:09 AM

    Hello everyone,

    I'm currently managing a client's environment where a large datastore is dedicated to storing archived data for one of their virtual machines. A virtual disk was created to fully utilize this datastore and attached to the VM as needed. However, following the creation of a snapshot, the VM began experiencing crashes, citing insufficient space on the datastore.

    After deleting the snapshots and dealing with several days of disk consolidation errors, the issue was eventually resolved. That said, steps need to be taken to ensure similar problems don't arise in the future.

    Would it be possible to configure the datastore so it is reserved exclusively for this VM? From the information gathered so far, it appears that removing the datastore from the heartbeat list and assigning vCenter read-only permissions to it could achieve this objective. Can anyone confirm if these steps would be effective? Additionally, could there be any unintended consequences for the VM's operability as a result? For context, the datastore is iSCSI, though this may not be directly relevant.

    Thank you in advance for your insights!



    ------------------------------
    Nathanael Pacheco
    ------------------------------


  • 2.  RE: Preventing Space and Snapshot Problems with a Dedicated VM Datastore
    Best Answer

    Posted Dec 26, 2024 11:35 AM

    To address this issue, one possible approach is to configure the virtual disk as "Independent-Persistent" within the VM settings. This configuration ensures that the disk is excluded from snapshots. Alternatively, another option would be to remove the datastore altogether and instead map the entire iSCSI LUN to the VM as a pRDM (Physical Raw Device Mapping).

    It is worth noting that both of these solutions will also prevent the VM's disk from being included in image-based backup procedures.

    Furthermore, it is considered best practice to maintain at least 20% free space within datastores to mitigate such problems. It may also be beneficial to adopt a naming convention for the datastore that clearly designates it as being dedicated to this particular VM.

    Best regards,




  • 3.  RE: Preventing Space and Snapshot Problems with a Dedicated VM Datastore

    Posted Dec 27, 2024 04:35 AM
    TBH the requirement is not very clear to me. 
    When you say "a large datastore is dedicated to storing archived data for one of their VMs", do you mean to say that dedicated datastore contains backup (snapshot) files of the VM?
    Also, your statement "A virtual disk was created to fully utilize this datastore and attached to the VM as needed", how are you preventing other VMs from getting migrated to this Datastore since this ISCSI Datastore would be presented to the Host and there would be several other VMs running on that Host.
    Also, as per your statement "following the creation of a snapshot, the VM began experiencing crashes, citing insufficient space on the datastore", do you have the exact error message? What is the free space on the datastore?
    What application is this VM hosting? Is this a Database VM?
     
    Now coming to your question "Would it be possible to configure the datastore so it is reserved exclusively for this VM?"
    I can think of 2 ways
    1. Present a specific LUN as physical rdm to the VM
    2. Use Storage Policy Based Management (SPBM) to create a storage policy to include a specific datastore type and then associate the VM with this policy.
     
    Hope this helps.




  • 4.  RE: Preventing Space and Snapshot Problems with a Dedicated VM Datastore

    Posted Dec 27, 2024 08:41 AM

    I believe the best way to prevent the creation of new VMs or migrating other VMs to this datastore is to use permissions. As you said, make it read-only for all users, and the VM on it will not be affected.

    Just remember you need some combinations of different permissions to achieve your goal, for example, there are some specific privileges you need to give the datastore to run the VM without any problem, such as "Datastore > Update virtual machine metadata"