{"id":597,"date":"2021-09-20T12:25:25","date_gmt":"2021-09-20T12:25:25","guid":{"rendered":"https:\/\/robinplomp.com\/?p=597"},"modified":"2022-01-12T14:02:08","modified_gmt":"2022-01-12T14:02:08","slug":"file-locks-on-vsphere","status":"publish","type":"post","link":"https:\/\/robinplomp.com\/?p=597","title":{"rendered":"File locks on vSphere"},"content":{"rendered":"<p><a href=\"https:\/\/robinplomp.com\/wp-content\/uploads\/2021\/09\/vmware_vSphere7_graphic_thumb.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"vmware_vSphere7_graphic_thumb\" style=\"border: 0px currentcolor; border-image: none; float: left; display: inline; background-image: none;\" alt=\"vmware_vSphere7_graphic_thumb\" src=\"https:\/\/robinplomp.com\/wp-content\/uploads\/2021\/09\/vmware_vSphere7_graphic_thumb_thumb.jpg\" width=\"244\" height=\"85\" border=\"0\" align=\"left\"><\/a>In a project we where starting an action to export a VM to an OVF file. We launched the export from the vSphere WebClient. During the export action the file stream failed and we cancelled the export action. Because we where running into a time restriction with the allowed time frame we wanted to boot the machine so it would be available to the end users.<br \/>\n<!--more--><br \/>\nOnce we booted the machine we received the following error: <em>File system specific implementation of Ioctl[file] failed. <\/em>This resulted in not being able to boot the machine.<\/p>\n<p>Together with VMware Support we where able to resolve this issue by identifying what was locking this VM files, and remove the lock.<\/p>\n<p><a href=\"https:\/\/robinplomp.com\/wp-content\/uploads\/2021\/09\/2021-09-20-13_18_56-2021-09-19-21_07_28-admpqr_rplo01@ads-pmpbeh-v01.ads_.net-PMP-RDP-SESSION-%E2%80%94-Moz.png\"><img loading=\"lazy\" decoding=\"async\" title=\"2021-09-20 13_18_56-2021-09-19 21_07_28-admpqr_rplo01@ads-pmpbeh-v01.ads.net - PMP RDP SESSION \u2014 Moz\" style=\"display: inline; background-image: none;\" alt=\"2021-09-20 13_18_56-2021-09-19 21_07_28-admpqr_rplo01@ads-pmpbeh-v01.ads.net - PMP RDP SESSION \u2014 Moz\" src=\"https:\/\/robinplomp.com\/wp-content\/uploads\/2021\/09\/2021-09-20-13_18_56-2021-09-19-21_07_28-admpqr_rplo01@ads-pmpbeh-v01.ads_.net-PMP-RDP-SESSION-%E2%80%94-Moz_thumb.png\" width=\"450\" height=\"65\" border=\"0\"><\/a><\/p>\n<p>With the command <strong><em>lsof | grep vm name <\/em><\/strong>we get a list of the current locks on the files for this VM. In the above screenshot you can see that the vpxa process is still locking the files. The process that is locking the VM files (vpxa) is the vCenter Agent Services.<\/p>\n<p>With the <strong><em>kill \u20139 67866<br \/>\n<\/em><\/strong>The \u2013<strong><em>9<\/em><\/strong>&nbsp; switch means, the process will be killed by the kernel. This command cannot be ignored by the OS.<\/p>\n<p>After the kill command we run the lsof command to be sure that the process is gone. We are now able to boot the machine.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a project we where starting an action to export a VM to an OVF file. We launched the export from the vSphere WebClient. During the export action the file stream failed and we cancelled the export action. Because we where running into a time restriction with the allowed time frame we wanted to boot &hellip; <a href=\"https:\/\/robinplomp.com\/?p=597\" class=\"more-link\">Lees verder <span class=\"screen-reader-text\">File locks on vSphere<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,22],"tags":[44],"class_list":["post-597","post","type-post","status-publish","format-standard","hentry","category-vcenter","category-vmware","tag-file-locks"],"_links":{"self":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=597"}],"version-history":[{"count":2,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/597\/revisions"}],"predecessor-version":[{"id":712,"href":"https:\/\/robinplomp.com\/index.php?rest_route=\/wp\/v2\/posts\/597\/revisions\/712"}],"wp:attachment":[{"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinplomp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}