Hi folks,
Ivailo here to talk about a problem I had few days ago. While I was working on a customer’s server running a VM on ESXi 5.0, the VM froze so I had to forcibly reset it. When I did so, the reset task got stuck at 95%. I did some digging and found few threads talking about the same issue but they were all for ESXi 4. I had to do some additional research and modify the commands in order to make them work on ESXi 5. Bellow are the steps that resolved my problem:
- With vSphere Client, connect to the host or the VC server that controls the host.
- Click on the host and go to the Configuration tab.
- Click on Security Profile.
- Click on Properties in the Services table.
- Start ESXi Shell and SSH services.
- Open a SSH session to the host.
- Execute /sbin/services.sh restart. This will restart all agents. The vSphere Client or the vCenter server will lose connection to the host. Reconnect! The VM may show as (invalid).
- Find the PID of the process by typing ps|grep “<VMName>”. The second number before the name of the VM is the PID.
- Kill the process by typing kill -9 <PID>.
- Go to /vmfs/volumes/<DataStoreName>/<VMName>.
- Delete the swap file by typing rm –r <SwappFileName.vswp>
- In vSphere Client right click the VM and select Remove From Inventory.
- Browse the data store, open the VM folder, right click on the .vmx file and select Add to Inventory.
- Power On the VM.
Hope this helps.
Ivailo Mitkov