VMware Cloud Community
Janmail
Enthusiast
Enthusiast

Wrong Virtual Machines count in ESXi 6.0

Hi guys.

I have moved from Vcenter 6.0 to 6.7

In my old Vcenter I have a Vmware Machines Count of 618 and host count of 46

in my new Vcenter 6.7 I have Vmware Machines count of 582 and host count of 46 

which tells me that I'm not missing any hosts. I went one by one and rechecked them 2 times. I have all hosts moved.

I found also 2 templates between VM's on old Vcenter.

Now is the question, what am I missing?  is it a known bug that vcenter version 6.0 can have a wrong count ?

maybe that its still keeping count of old removed machines ?

Is this something known ? anybody had the same issue ?

thanks in advance for any info / advise.

Labels (1)
Tags (2)
Reply
0 Kudos
6 Replies
Lalegre
Virtuoso
Virtuoso

Hey @Janmail,

Where are you seeing this count of the VMs and one more question how are you comparing between the old vCenter and the new if you updated it?

You can try also to run a RvTools to get that information from the new vCenter and count from there: https://www.robware.net/rvtools/

Reply
0 Kudos
Janmail
Enthusiast
Enthusiast

@Lalegre 

I installed the new vcenter 6.7 on a separate system.

Then I moved all data-centers, clusters etc.. manually to make sure it's 100% clean install.

then I went back to the old 6.0 there from the tabs, like summary, virtual machines etc you can see the total hosts and virtual machines.

on the 6.7 in the html5 gui you can see the total amount of hosts and vm machines.

I'll check the rvtools, maybe I should scan the old and the new then put the vm list next to each other..

Reply
0 Kudos
Lalegre
Virtuoso
Virtuoso

@Janmail,

So you are comparing the disconnecte entries from the old vCenter with the actual ones on the new vCenter Server, so yes I recommend you to go over RvTools to do a comparison.

Reply
0 Kudos
jburen
Expert
Expert

It could be that the inventory on your old vCenter was not correct anymore. Personally, I would check if there is a difference between the VMs that are on the datastore and the VMs in the inventory. If every VM is stored on a datastore and the datastores are still the same, you could count the number of vmx files and compare that number to the number of VMs in the inventory. Something like this:

Write-Host "There are $((Get-VM).Count) VMs in the inventory."
$count = 0
foreach ($ds in get-datastore) {
$ds | New-DatastoreDrive -Name DSTemp | Out-Null
$count = $count + (Get-ChildItem -Path DSTemp:\ -Recurse | ? {$_.Name -like "*.vmx"}).Count
Remove-PSDrive -Name DSTemp
}
Write-Host "The are $count VMX files found on all datastores."

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos
Janmail
Enthusiast
Enthusiast

@jburen  I think there were some vm's on old host that were in the datastore but removed from inventory, could that be the reason?

so that would mean that 6.0 counts vm's by datastore images ?

Reply
0 Kudos
jburen
Expert
Expert

A 6.0 vCenter inventory works the same as a 6.7 vCenter inventory. All the VM objects are placed in a database and can be viewed in the vSphere Web Client. But if there is a discrepancy I would double-check with the vmx files that are stored on the datastores. Could it be that the old vCenter inventory had some VMs listed that no longer existed?

And I would not spend that much time investigating an old inventory. It's not the inventory that counts but the actual VMs. So if you think you're missing some VMs check your datastores.

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos