VMware Cloud Community
ColBaby
Contributor
Contributor
Jump to solution

How to find VM count growth rate?

I'd like to graph the growth in the Virtual Machine count (ie number of VMs) since we deployed ESX over 12 months ago.

The VC performance graphs don't appear to provide this information.

Can anyone suggest a way I can determine the growth of the number of Virtual Machines (per cluster, for example)

Thanks,

Col

0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

Hi Col, if you're comfortable with accessing your VC database, then the 1st select statement will return a list of VMs created and the date of their creation. The 2nd query will return a list of all VC events (or specifically a list of events that have occurred at your site). If you scroll down the list you'll find a number of vim.event.Vm* event types. You may want to look through the list of these events as I had 1 VM in my test farm that had a vmRegsiteredEvent, but no VmCreatedEvent. But basically, the 1st query should give you a good ideas of VMs created and you can expand on it to get a count of VMs per month. Something like the below

select vm_name, create_time from vpx_event where event_type = 'vim.event.VmCreatedEvent'

select distinct(event_type) from vpx_event

select vm_name, create_time from vpx_event where event_type = 'vim.event.VmRegisteredEvent'

Query to get VMs created per month

-


create table #temp_vm_create (vmname varchar(30), year_month varchar(7))

insert into #temp_vm_create (vmname, year_month) select vm_name, left( convert (nvarchar(30) ,create_time, 112 ), 6) AS YEAR_MONTH from vpx_event where event_type = 'vim.event.VmCreatedEvent'

order by YEAR_MONTH

select count(*), year_month from #temp_vm_create

group by year_month

drop table #temp_vm_create

View solution in original post

0 Kudos
3 Replies
gorto
Enthusiast
Enthusiast
Jump to solution

Beyond 12 months? Keep your own records, or get the DBAs to retain the older data for future analysis Smiley Wink

Dave_Mishchenko
Immortal
Immortal
Jump to solution

Hi Col, if you're comfortable with accessing your VC database, then the 1st select statement will return a list of VMs created and the date of their creation. The 2nd query will return a list of all VC events (or specifically a list of events that have occurred at your site). If you scroll down the list you'll find a number of vim.event.Vm* event types. You may want to look through the list of these events as I had 1 VM in my test farm that had a vmRegsiteredEvent, but no VmCreatedEvent. But basically, the 1st query should give you a good ideas of VMs created and you can expand on it to get a count of VMs per month. Something like the below

select vm_name, create_time from vpx_event where event_type = 'vim.event.VmCreatedEvent'

select distinct(event_type) from vpx_event

select vm_name, create_time from vpx_event where event_type = 'vim.event.VmRegisteredEvent'

Query to get VMs created per month

-


create table #temp_vm_create (vmname varchar(30), year_month varchar(7))

insert into #temp_vm_create (vmname, year_month) select vm_name, left( convert (nvarchar(30) ,create_time, 112 ), 6) AS YEAR_MONTH from vpx_event where event_type = 'vim.event.VmCreatedEvent'

order by YEAR_MONTH

select count(*), year_month from #temp_vm_create

group by year_month

drop table #temp_vm_create

0 Kudos
ColBaby
Contributor
Contributor
Jump to solution

Hi Dave,

You certainly hit the nail on the head with that one. This is exactly what I was looking for. Thanks!

Col

0 Kudos