Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a problem. My vSphere 4 host virtual machine is powered on, but is not accessible via the network (I don't know what is wrong with it, for reasons that will soon become clear).

Because my vSphere host is clearly in a bad state, I can't connect to the vSphere centre to manage my cluster. So I logged onto each blade in the cluster (all 10 of them, ESXi 4), and I can't find the vSphere VM listed in any of their individual inventories.

Which makes me believe that the VM is orphaned, but still powered up, on one of the blades.

Is there any way I can get the machine back into a local blade's inventory? I know I can add it to the inventory by browsing the SAN datastore, but I won't be able to start it if it's already running on another blade!

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

Jump onto the service console on each ESX host and run vm-support -x to get a list of all VMs that host is running or things it is running.

You should be able to ID the correct host. If it doesn't show up on any host, then none of them is running it and you should be try the 'add to inventory' route to re-attach it.

On the other hand if you do find it, you can make a note of the VMID then run the following to bring it down:

  • less /proc/vmware/vm/{Enter VMID Here}/cpu/status
  • Scroll over to the right until you find a piece of text in the format vm.####
  • Make a note of the 4 digits show in this text. This is the Master User World ID. It's usually one digit lower than the VMID
  • /usr/lib/vmware/bin/vmkload_app -k 9 {Enter Master User World ID Here}
  • You should now be able to re-attach the VMX to an inventory.

Future-wise, consider a physical vCenter box. A virtual one still doesn't sit quite right with me.

share|improve this answer
    
Hi Chris, this are ESXi hosts, but I assume that I should be able to do the same thing via the remote CLI? –  Mark Henderson Feb 15 '10 at 22:01
    
Woo. +1,000,000 (if I could!) A virtualised vCentre is a supported installation environment, but I agree, it feels a bit... funny. Unfortunately we don't have any spare physical servers to deploy vSphere on. –  Mark Henderson Feb 15 '10 at 22:04
    
Glad its working. We keep running into similar problems with VMs that have snapshots left open for too long. Always bombs out on a Sunday morning ;( –  Chris Thorpe Feb 15 '10 at 23:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.