I've been bitten a few times by a 'feature' in Windows Virtual PC where all of my virtual machines disappear so I thought I'd write about the problem and how to solve it to save anyone else the grief of rebuilding their virtual machine list.
My current Windows Virtual PC list looks like this:-
As you can see from Primary Disk column on the right I keep all of my virtual machines (except Windows XP Mode) on a separate USB drive. The consequence is that the drive is not always plugged in. The Windows Virtual PC 'feature' is that if I accidentally start a virtual machine and forget to have my USB drive plugged in then it fails to run the virtual machine (fair enough, no problem here) and then removes all references to all virtual machines on that drive (not fair enough and a truly stupid idea):-
The solution lies in understanding that the Windows Virtual PC console is just a view on a folder. On this Windows 7 machine this is C:\Users\Guy Smith-Ferrier\Virtual Machines. Here's what the folder looks like in a command window before Windows Virtual PC has 'fixed' it:-
And here's what it looks like again after Windows Virtual PC has removed all of my references:-
Clearly Windows Virtual PC has simply deleted all of the VMCX files that refer to virtual machines on the USB drive. There are a number of solutions to the problem. The first and simplest is to use the Recycle Bin to undelete the VMCX files from the Virtual Machines folder. This is the best option although I have to say that I am not always convinced they are always present in the Recycle Bin. Alternatively you could have the foresight to have saved a copy of your VMCX files so that you can just copy them back to the Virtual Machines folder. If neither of these options are available to you then the fallback solution is to start each and every virtual machine that used to be in the list by double clicking on the virtual machine's VMC file and then the VMCX file will be automatically recreated.