VMware Cloud Community
marypoppins
Contributor
Contributor
Jump to solution

Can not consolidate on free hypervisor :(

DDear All,

I have a problem with consolidating. I have a vm, it has an ssd disk and a hdd disk. On the SSD partition there are eight "vmname-00000x-sesparse.vmdk and vmname-00000x.vmdk" files, on the hdd partition there are two "vmname-00000x-delta.vmdk and vmname-00000x.vmdk" files . When i tried to consolidate the web page shows an error: "Disk consolidation for VM_name has failed: Unable to access file since it is locked"

Key : haTask-15-vim.VirtualMachine.consolidateDisks-133004238

DDescription  Consolidate disk files of this virtual machine

State Failed - Unable to access file since it is locked

Errors

  • Consolidation failed for disk node 'scsi0:0': Failed to lock the file.
  • Consolidation failed for disk node 'scsi0:1': Failed to lock the file.
  • An error occurred while consolidating disks: Failed to lock the file.

When I try to search the problem, I see in the vmware.log in the vm's folder, that the problem start with:

failed to lock file vm_name-flat.vmdk

then failed to lock file vm_name.vmdk

It shows vm_name.vmdk failed to open with flags 0x20a ; failed to lock file (16392)

I tried to check with the vmfsfilelockinfo -p <files>, that show all the files locked by the virtual machine itself

When I tried to check with the lsof, I see that the second delta file locked by two 'things'

The vm has has the cartel id 562811.

[root@:/vmfs/volumes/.../vmname] lsof | grep 'vmname_1-flat.vmdk'

562811      vmx                   FILE                      128   /vmfs/volumes/.../vmname/vmname_1-flat.vmdk

[root@:/vmfs/volumes/...9/vmname] lsof | grep 'vmname_1-000002-delta.vmdk'

562811      vmx                   FILE                      126   /vmfs/volumes/.../vmname/vmname_1-000002-delta.vmdk

562811      vmx                   FILE                      129   /vmfs/devices/deltadisks/2c50c6f-vmname_1-000002-delta.vmdk

[root@:/vmfs/volumes/.../vmname] lsof | grep 'vmname_1-000001-delta.vmdk'

562811      vmx                   FILE                      127   /vmfs/volumes/.../vmname/vmname_1-000001-delta.vmdk

I don't dare to restart the machine (to keep the running state), however I would like to get rid of those sesparse and delta files. Is there any way to get rid of them? Using the free hypervisor tools?

Thank you very much

0 Kudos
1 Solution

Accepted Solutions
tayfundeger
Hot Shot
Hot Shot
Jump to solution

If you restart the management agent or reboot the ESXi, your problem will be corrected. But you need to consolidate snapshots immediately.

Don't be afraid, it won't be a problem.

--
Blog: https://www.tayfundeger.com
Twitter: https://www.twitter.com/tayfundeger

vBlogger, vExpert, Cisco Champions

Please, if this solution helped your problem, "Helpful" if it solves your problem "Correct Answer" to mark.

View solution in original post

0 Kudos
4 Replies
tayfundeger
Hot Shot
Hot Shot
Jump to solution

If you restart the management agent or reboot the ESXi, your problem will be corrected. But you need to consolidate snapshots immediately.

Don't be afraid, it won't be a problem.

--
Blog: https://www.tayfundeger.com
Twitter: https://www.twitter.com/tayfundeger

vBlogger, vExpert, Cisco Champions

Please, if this solution helped your problem, "Helpful" if it solves your problem "Correct Answer" to mark.
0 Kudos
marypoppins
Contributor
Contributor
Jump to solution

Thank you very much for your fast reply!

I will do it in an hour as soon as users closes their work on the guest.

0 Kudos
tayfundeger
Hot Shot
Hot Shot
Jump to solution

Okay, if there's a problem, you'il rewrite it. We can help. First, you can restart ESXi's management agents when the virtual machine is on. Restarting the management agent does not put the virtual machine down.

--
Blog: https://www.tayfundeger.com
Twitter: https://www.twitter.com/tayfundeger

vBlogger, vExpert, Cisco Champions

Please, if this solution helped your problem, "Helpful" if it solves your problem "Correct Answer" to mark.
0 Kudos
marypoppins
Contributor
Contributor
Jump to solution

Dear Tayfun Deger,

Restart solved the poblem as you suggested! Very-very thank you for your kindness!

0 Kudos