VMware Cloud Community
nasco1
Contributor
Contributor

Used space is much bigger than real used space

Hi All,

I have a VM, which is used about 400GB but in the datastore, it shows the VM used 1.98 TB of datastore. Now I want to run consolidation for this VM but there is not enough space to run. I have tried to delete all snapshots but there is no luck because, there's nothing in Snapshot Manager, just only "You are here". Via console of ESXi, it is shown as below:

esxi-1-ss.JPG

How can I solve this issue?

8 Replies
TheBobkin
Champion
Champion

Hello nasco​.

From the timestamps it would appear that yes, these snapshots are likely part of the currently active disk-chain - this can be verified by looking at the chains parent-child info in each descriptor file and by looking at the .vmx (e.g. #cat VMname.vmx | grep vmdk   or Right-click > Edit Settings > Hard Disk 1/2/etc. > look at the path which will be -000004.vmdk).

How much space is free on the LUN/datastore that this VM resides on? I ask as if this is full then consolidation may not be possible until you extend the space or free up a little bit (e.g. by powering-off the VM and freeing up the 8GB the .vswp uses).

If there is free space on the datastore (if not thin then check with #df -h ), then you would likely be able to make a consolidatable reference by removing the current .vmsd (the file that shows snapshot chain in snapshot manager), then taking another snapshot of the VM and then using 'Delete All' snapshots option.

Another option would be to check can this job be performed from the CLI:

# vim-cmd vmsvc/snapshot.removeall <VM-ID>

If these are not working and you have free space then you likely have locked files which is a different issue.

Last resort would be to either clone the VM or consolidate the snapshots+base-disk into one vmsk using vmkfstools -i.


Bob

nasco1
Contributor
Contributor

Hi TheBobkin​,

You are correct, the output is exact as your prediction. I've just created a snapshot and now I'm waiting for the result of command "vim-cmd vmsvc/snapshot.removeall 58" (58 is VMId). It has been idle for an hour as below:

esxi-2-ss.JPG

0 Kudos
nasco1
Contributor
Contributor

TheBobkin

it does not help. I tried 2 times and now there are 2 new vmdk files as xxxx-000005.vmdk and xxxx-000006.vmdk (before is 000004.vmdk). The thin provision of this VM is bigger after trying this way. Pls help me, tks

0 Kudos
TheBobkin
Champion
Champion

Hello nasco​,

"It has been idle for an hour as below"

It's not idling it's trying to write the ~2TB of data you appear to have in snapshots.

"it does not help. I tried 2 times and now there are 2 new vmdk files as xxxx-000005.vmdk and xxxx-000006.vmdk"

Yes because you took (assumedly more than 1) extra snapshot, the number of snapshots here is unlikely the problem more so the size of the snapshots and likely your storage timing out at some point while trying to write the all the data back to the base-disks - the vmkernel.log and/or vmware.log of the VM should indicate this (or some other cause) for to failing to consolidate the snapshots.

You *may* potentially have better luck consolidating them with the VM powered off as the IOs of the VM itself can also be a source of contention to the storage that is trying to write-back the snapshots here. If this also fails then potentially cloning the disk with the VM powered off might be your only option but do ensure you have adequate space to perform this.

Bob

nasco1
Contributor
Contributor

Dear TheBobkin

It's too difficult for me. This is the VM which is providing 24/7 service. I cannot turn it off Smiley Sad

0 Kudos
dbalcaraz
Expert
Expert

After reading the comments, I would suggest to clone this VM to another Datastore if you don't have enough space.

The problem with orphaned snapshots is that if you check the .vmx file of the VM it will point to the latest snapshot you created (you can verified) and you can do nothing about it except consolidate as you can this VM.

So, you can clone the VM or try to consolidate it offline (couldn't work) but anyway you will end in power-off this VM.

The only thing is that if you clone the VM while is powered on, well changes that are ocurring maybe are not consistent, this is why cloning when is powered-off is usually a success.

Then you power on the new cloned VM shouldn't suppose any problem.

-------------------------------------------------------- "I greet each challenge with expectation"
0 Kudos
a_p_
Leadership
Leadership

To find out what's possible, please answer the following questions and/or provide the required information.

  • provide the result of ls -lisa  (this will contain some more details, including used disk space)
  • attach the vmware.log file to a reply post (the important part is to find out the snapshot chain, i.e. the order of the .vmdk files)
  • how much free disk space do you currently have on the datastore?
  • is it possible to increase the LUN/datastore size?
  • do you have other datatores (how much free disk space do they have)?
  • which vSphere version/edition do you use? I'm asking to find out whether Storage vMotion is an option.

André

0 Kudos
vFouad
Leadership
Leadership

Assuming you have sufficient space to create a new version of the VM; and if cloning the VM is not a good answer for you could try using VMware converter (free)

VMware Converter : How to perform P2V and V2V Migration  And perform a V2V Migration. If you configure it correctly you can synchronize the VM and have the process automatically turn off the source VM and failover to the new VM so that no one even notices Smiley Happy

0 Kudos