snapshot vmem file in vSan data store

Reading Time: 2 mins

Recently I got a request from one of the VSAN customers to provide the memory dump of a vm. To generate the same, we will have to take the snapshot of specific vm with memory box checked.

  1. Pick the vm  > right click > snapshot > take snapshot > give a name to the snapshot , description is just optional.
  2. verify if the memory box is checked.
  3. In general scenario , after successful creation of memory snapshot, vmem file gets created with the size equal to memory assigned to it. whereas this works some thing different in VSAN - vSan uses the object based storage, vmem just acts as a pointer to the vmdk file. So the vmem file size in VSAN datastore is just few kb's with some meta data information - in my case it is just 0.12 KB.

 

How to fix this ? 

Above problems in VSAN datastore can be fixed in two ways:

Option1 :

Move the vm from vSan to any non vSan datastore using storage vmotion, take a memory snapshot and this way the vmem gets its designated size i.e., size of the memory assigned to it. Once completed, copy or download the required vmem / vmsn files to local computer and move the vm back to vSan datastore.  There is a risk involved with this procedure, If the host goes down with any issue, then vm would be unrecoverable, I would not prefer this.

Option 2:

This option is very easy to implement, and doesn’t require the whole vm to be moved to non vSAN DS, instead just the vmem file to copied from VSAN to any other DS - preferred file based storage and the vmem fetches all data from vsan DS and creates the file as the size of memory assigned. Once successfully copied, vmem file should be equal to size of memory assigned to it.