Parallels VM locked out

This morning when I went to start up WinXp on Parallels and I got a scary message: "Virtual Machine Windows XP cannot be opened since it is already used in another Parallels Desktop window"Oh no its not I thought, I'm sure of that. Luckily after a little while of looking around (googling bascialyl!) I found a solution. Apparently Parallels creates a .lock file when you open a VM and sometimes (mainly after abnormal shutdowns) this file isn't removed - causing Parallels to think its in use. The fix is simple(ish) though it would be easier if it wasn't a hidden file.
  1. Exit Parallels
  2. Launch the Terminal application (in the Utilities folder inside the Applications folder on your hard drive)
  3. Inside a Teminal command window, type: "cd ~/Library/Parallels"
  4. Type "ls" (to confirm you're in the right place; you should see a listing of .pvs and .hdd files)
  5. Type "ls -asl"
  6. Look for a file whose name begins with a dot (".") and ends in ".lock
  7. Remove that file by typing "rm -i " (e.g., "rm -i .winxp.1.pvs.lock") The "-i" tells the remove command to prompt you before deleting the file)
  8. Type "ls -asl" to confirm that it's gone
  9. Exit the terminal window (command-Q or type "exit" then command-Q)
Hat tip to the Parallels Forum for this answer