So for some odd reason, my VCentre VM had stopped/died/crashed or, possibly been shutdown by someone. For whatever reason, I could not logon to my VCentre instance using my vSphere client.
For some reason it did not occur to me to just attached my vSphere client directly to one of my ESX hosts. Instead I had this minor learning curve.
The command line to start a VM is
vim-cmd vmsvc/power.on <Vmid>
where
vim-cmd vmsvc/getallvms
While several VM’s were listed, the VM for my vCentre instance was not among those shown. So I had to find the .vmx config file to add to my host config. My VMWare setup uses iSCSI paths that map to /vmfs/volumes and in here I eventually found my way to
ls /vmfs/volumes/4ce64694-5ae4e508-917e-001b216c49dd/VCenter4.1/
In this directory was the .vmx config file along with all the other files that make up a virtual machine instance. I needed to add this VM to my host config (this is a lttle like when you add a VM to the inventory in the vSphere client !). The command to do this was
vim-cmd solo/registervm <full path to the .vmx file>
Now that my Vm had been added to my ESX host VM list, repeating
vim-cmd vmsvc/getallvms
now showed
Now I had the Vmid number with with to use the command line to powr on the VM.
vim-cmd vmsvc/power.on <Vmid>
This should have been enough to get my vCenter VM up and running. But, 10 mins later, when I tried to ping the IP address of the VM, I still could not contact it ? I decided to have a look at any queued command to the VM with
vim-cmd /vmsvc/get.tasklist <Vmid>
but this simply listed the command to power on. I tried sending a reset VM command with
vim-cmd /vmsvc/power.reset <Vmid>
but this command just got stacked under the existing command to power on the VM ? At this point it dawned on me that I could start the vSphere client up and attache directly to the ESX host IP address instead of the vCenter Ip address. When I did this, I saw the all to familiar little exclamtion mark on the vCenter VM icon.
When I right-clicked the icon and selected ‘Open Console’, this popped up the ‘Did you move/copy this VM’ dialog box shown above !
Grrrrrrrr. Reading up I cannot see any way to :-
a) Determine if one of these has been fired
b) Respond to it if this is the case
from the VMWare command line. Most annoying, but it did give me a crash course in ESXi command line :o)

