{"id":2802,"date":"2020-04-12T10:08:18","date_gmt":"2020-04-12T03:08:18","guid":{"rendered":"http:\/\/rachmadona.net\/?p=2802"},"modified":"2020-04-12T10:08:18","modified_gmt":"2020-04-12T03:08:18","slug":"unable-to-consolidate-vm-file-is-locked","status":"publish","type":"post","link":"https:\/\/rachmadona.net\/?p=2802","title":{"rendered":"Unable to Consolidate VM: File is Locked"},"content":{"rendered":"\n<p>Recently  i had weird case during the consolidation of one my production VM, several users reported slowness while they are working and then after had gone thru i found it had snapshot persist. Not sure why it was not deleted as supposed post the backup activity completed.<\/p>\n\n\n\n<p>So, i raised a ticket to VMware support and we had a remote session. Upon checking we found particular VMDKs are still being attached to the backup proxy server.<\/p>\n\n\n\n<p>Here is the command they had used during troubleshooting:<\/p>\n\n\n<p>[root@esx:~]<br \/>\nvmware -vl<br \/>\nvim-cmd vmsvc\/getallvms | grep -i vm_name<br \/>\ncd vmfs\/volumes\/datastore_name\/vm_name\/<br \/>\ncat vm_name.vmx | grep vmdk<br \/>\nvmfsfilelockinfo -p vm_name_2-000001.vmdk<br \/>\nvmfsfilelockinfo -p vm_name_2-000001-delta.vmdk<br \/>\nvmkfstools -D vm_name_2-000001.vmdk<br \/>\nvmkfstools -D vm_name_2-000001-delta.vmdk<\/p>\n<p>ls<br \/>\nvmkfstools -D vm_name_2-000001-sesparse.vmdk<br \/>\nesxcli network nic list<br \/>\nlsof | grep vm_name<br \/>\ntouch *<br \/>\nvmkfstools -D vm_name_2-flat.vmdk<br \/>\nvmfsfilelockinfo -p vm_name_2-flat.vmdk<br \/>\nhostname<br \/>\nwatch -d &#8216;ls -luth | grep -E &#8220;flat|sesparse&#8221;&#8216;<br \/>\n[root@esx:~] lsof | grep vm_name<\/p>\n\n\n\n<p>Hope this help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently i had weird case during the consolidation of one my production VM, several users reported slowness while they are working and then after had gone thru i found it had snapshot persist. Not sure why it was not deleted as supposed post the backup activity completed. So, i raised a ticket to VMware support&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,25],"tags":[],"class_list":["post-2802","post","type-post","status-publish","format-standard","hentry","category-virtualization","category-vmware"],"_links":{"self":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2802"}],"version-history":[{"count":0,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2802\/revisions"}],"wp:attachment":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}