VMware Cloud Community
cypherx
Hot Shot
Hot Shot
Jump to solution

vm invalid state, remove readd then failed to init. swap file

I had 2 vms this morning say (invalid state) next to them, but the odd thing is they were running fine.  Just could not do a thing with them in vSphere client.  One of them was actually my vcenter server and that didn't skip a beat.  So I removed these two machines from inventory and then re-added them.  vcenter server came back with a play (running) icon on it already, but my other machine did not.  If I go to power on my other machine it complains about the failure to initialize the swap file.

fault.FileLocked.summary

Failed to power on VM
Could not power on VM : Busy.
Failed to initialize swap file '/volumes/7ba984ee-de659c1c/BWEB/BWEB-a4a50e6c.vswp' : Busy
Any idea what to do now?  I thought maybe a process is holding that file hostage but I'm not sure what to look for.  I tried ps -ef | grep and wildcarded part of the vswp file name but nothing came up.
Any way to dertermine what is locking this file to kill it and then maybe I can power this machine back on?
0 Kudos
1 Solution
3 Replies
cypherx
Hot Shot
Hot Shot
Jump to solution

Well it already tells me what file is locked (the vswp file), but where the heck is the lsof command so I can see what PID is holding it hostage so I can kill -9 it?

lsof : no such file or directory

Is this command not available in VMWare ESX 4.1?  Can I download it from somwhere and SCP it to one of my vmware hosts?

0 Kudos
cypherx
Hot Shot
Hot Shot
Jump to solution

Well how I got it booted back up was on the host running this vm, I used this command:

vm-support -x

Once I found the world id for the machine I did a

vm-support -X <worldid>

It took about 10 minutes but did its thing.  When finished I was able to power on the machine again.  Thanks for your help.  That article was the correct article with some good information for me.

Still weird the lsof command does not exist in my installation.  Oh well, I can use vm-support to figure it out.  Thanks!

0 Kudos