In this post I want to discuss what makes an Orphan or a Zombie in a VMware environment. I also want to introduce some of my favourite tools for detecting these malodorous fiendish creatures which can wreak havoc within your virtual world.
From time to time you might come across Orphaned or Zombie virtual machine files that you need to deal with before being able to complete a task.
An orphaned virtual machine is one where the relationship between a vCenter Inventory object and associated objects living on datastores has become inconsistent. Think of it as a lack of synchronization between the vCenter view of the world, and what's actually out there.
It is possible to have entire orphaned virtual machines, or a subset that comprise a single VMDK disk or other files. You might not be able to tell which parent virtual machine the subset of files belongs to, hence the use of the word orphaned.
You can see from the VMware Knowledge Base article KB at this link some of the reasons why Orphaned objects can occur:
This is not an exhaustive list and sometimes it's hard to qualify why something has occurred. My experience is that most zombies have been caused by either:
You can simulate a scenario in a lab to become more familiar with resolving these issues. I will be doing that in subsequent posts, to illustrate how you can create a zombie yourself, and detect and remediate that situation.
Before we do that, what tools are people using today in the VMware Community to find these objects?
Two of the most popular free toolsets within the VMware community are:
You import the Community powerpack it by running the PowerGUI Administrative Console. Then go to File -> Powerpack Management and click the Import option and select the Community power pack.
Used together, the VMware powerpacks are very powerful, both for reporting and diagnostic purposes.
For both RVtools and PowerGUI, you need to connect to vCenter to be able to execute queries. You can access individual hosts too but that is less useful than a consolidated view.
Log in to vCenter with the required credentials:
At this point RVtools will execute scripts which collect information from vCenter and populate its many tabs:
You need to add a managed host to PowerGUI in the vSphere Management Powerpack:
Now add your credentials, which will be subsequently cached. You can disconnect and clear the cache if you need to for security reasons.
Once that's done you can click on queries in the Explorer view which will cause real time Powershell queries to be issued against the vSphere API:
If you navigate down the left hand side explorer view you will find the following query you can run which will show you all the zombie and orphaned objects within your environment:
And here's another tip. If you want to modify the code, just select Properties for the object in question and the Powershell code being used to execute the query will be shown:
For other Powershell code available for download I suggest you check out the Blogs of Alan Renouf, Luc Dekens and Jonathan Medd.
Now … To establish the health of your environment using RVtools just click on the vHealth tab which will show you the results of a quick health check against your environment:
There are 11 queries which are run, as follows:
To set the threshold values above, just select the menu Health -> Properties and you can tailor to your organization's thresholds and policies:
Until next time…..