VMware Cloud Community
Byron_Zhao
Enthusiast
Enthusiast

Orphaned VM

I have searched for this topic in the forum, however, I can't find a similar case as mine.

This morning I found a VM grey out said orphaned. No one has done anything to it. The VM is still up and running, and it responsed to ping and RDP request. I left it alone, and hoping VC will pick it up. At the end of the day, its status stay as Orphaned. I removed it from inventory, and added it back. Now its status is Powered Off. However, I can still be able to RDP to it. from the host, running "vmware-cmd getstate" will return its status as Off.

Now, what am I supposed to do?

Environment:

ESX 3.0.1, 35804

VC 2.0.1, Build 40644

VM is in production, and I want to fix the problem without shutting down any VM or Host. Is it possible? Any suggestion?

BZ

0 Kudos
30 Replies
Kevin-Graham
Enthusiast
Enthusiast

I did a service mgmt-vmware restart on the host where the orphaned server was and then Reconfigured for HA (Disable & Enable) and it picked up the orphaned VM

0 Kudos
Byron_Zhao
Enthusiast
Enthusiast

For the last orphaned VM, it never came back normal by itself. I have to shutdown the VM, move it to another host, and power it back on. I have all kind of problem with the same host, so I ended up with restarting it after VMotion all the VMs off it. Now everything is fine. But tech support couldn't tell me what caused it, and what is the right way to fix it.

-BZ

0 Kudos
benny_hauk
Enthusiast
Enthusiast

Anyone ever see VMotion work but VirtualCenter report and behave like it didn't work?

I just had the same symptoms as above happen to me and just now got it resolved. The solution was similar to the 'service mgmt-vmware restart' solution with one wierd twist.

When the VM was clicked on in VC client, the client showed that it was orphaned but that it was "on" the source ESX host (the "source" in the source/destination sense of the VMotion operation that timed out at 10%). The reality of it was that the VM actually had been successfully VMotioned even though the % indicator showed that it never really started (the 10% freeze is what this typically means) and it eventually timed out.

What I did to resolve the issue without bringing ANY VM down:

On the DESTINATION that the VM apparently failed to VMotion to, I ran 'vmware-cmd -l' to verify that it was, in fact, registered there (it was, to my surprise).

I removed the orphaned VM from the VC Inventory at that point (VC thought the orphaned VM was attached to the wrong host anyway). The VM stays up.

I ran the 'service mgmt-vmware restart' on the DESTINATION esx host (I also restarted the VirtualCenter Server service - I did each of these restarts a few times just to rule out the possibility that "something" incorrect stuck around because one of these weren't restarted in the correct order - probably very unnecessary but it didn't hurt anything either).

Within 5 minutes the VM that had been VMotioned, labeled as orphaned by VC, then Removed from Inventory by me showed up on the DESTINATION host in the VC client - still up and running.

That brings me to my original question: Anyone ever see VMotion work but VirtualCenter report and behave like it didn't work? That's what happened in this case.

Benny Hauk Systems Admin, VCP3/VCP4 LifeWay Chrstian Resources
0 Kudos
er1k
Contributor
Contributor

I have searched for this topic in the forum, however,

I can't find a similar case as mine.

This morning I found a VM grey out said orphaned. No

one has done anything to it. The VM is still up and

running, and it responsed to ping and RDP request. I

left it alone, and hoping VC will pick it up. At the

end of the day, its status stay as Orphaned. I

removed it from inventory, and added it back. Now its

status is Powered Off. However, I can still be able

to RDP to it. from the host, running "vmware-cmd

<cfg> getstate" will return its status as Off.

Now, what am I supposed to do?

Environment:

ESX 3.0.1, 35804

VC 2.0.1, Build 40644

VM is in production, and I want to fix the problem

without shutting down any VM or Host. Is it possible?

Any suggestion?

BZ

Hi,

We had the same situation here. Tried all the solutions mentioned in this topic, but none was effective.

I saw we both used the same version of VC. We upgraded the Virtual Infrastructure Server and Clients to 2.0.2 (build 50618)

This seemed to be the solution of the issue, Without even restarting the VMs.

Cheers,

Erik

0 Kudos
RJ_Bruce
Contributor
Contributor

I just got done with a similar issue.

My symptoms: a virtual machine reported as Orphaned in Virtual Center, but completely up and running...ping, RDP, remote controllable if I connected to the ESX host directly with the VI Client. Also, I was unable to get a 'Create VM' task to complete for a manual VM creation, nor was I able to add a new VM via Converter. In all cases, I saw some activity in the VC logs to suggest it started tasks, but then they timed out.

I got the hint from another post in the forums and ran:

service mgmt-vmware restart

service vmware-vpxa restart

on the service console of the ESX host that had the VM. After that completed, I got a brief 'disconnected' on another VM on that ESX host, but then both the orphaned VM and the disconnected VM went back to normal and Virtual Center is reporting status correctly now. I've also been able to create new VMs.

Technical support (hp in this case) was going to send me down the 'Remove from inventory', browse the datastore, 'Add to inventory' route, but the service restart route appears to have corrected the broader issue.

0 Kudos
Sria
Contributor
Contributor

Did you try this ... Give a try ...

1. Disconnect host from VC

2. Stop VirutalCenter Agent or remove the VirtualCenter Agent rpm from ESX.

3. Connect to ESX through putty (SSH) and register the Ghost VM as

vmware-cmd -s register &lt;Ghost VM vmx file path&gt;

Before registering the VM, browse the vmx file just to see whether its pointing to the correct Virtual Disk or not.

4. Verify that VM is registered on ESX host.

5. Connect the host back to VC.

0 Kudos
leadbelly
Contributor
Contributor

Hey, I tried what you said and it worked great. My VM is no longer in an Orphaned state. Thanks for the post.

0 Kudos
jjgunn
Enthusiast
Enthusiast

"Hello,

You can right click on the virtual machine and select remove. This will remove the virtual machine from VI ( before you do this note the name, permissions applied directly on the vm, location of the vm in your VI hierarchy and the datastore it is on of your server has multiple ). Then, in VI, navigate to the datastore you identified above, move into the removed virtual machines folder and right click on the VM config file and select add to inventory. You will be prompted with a wizard to add the vm back to VI.

I am pretty sure the virtual machine needs to be turned off to do the above. I know of no other way myself. "

The above solution worked for me. Thank you

0 Kudos
linusali
Contributor
Contributor

vmware-cmd -s register &lt;Ghost VM vmx file path&gt;

did the trick, now the VM is no longer "Ghost" .

Thanks Sria.

--

salih's blog

http://salihsblog.blogspot.com
0 Kudos
ayang
Contributor
Contributor

Disconnect from VI, and reconnect worked for me.

Thanks everyone,

0 Kudos
VMXTROOPER
Contributor
Contributor

Made a few modifications to your soultion but it WORKED!!!!!!!!!!!!!!!!!

Thanks

0 Kudos