jschlach
Enthusiast
Enthusiast

VCDB cleanup when using Lab Manager 2.5

We are running a very active Lab Manager installation, with 400+ deployments a day. We are removing orphaned (LM's unused) VMs from virtual center using the RemoveOrphanedVMs script, but our VCDB is still growing. Our VCDB has grown to 9gb in size in the course of 6 months. I found a KB article ( http://kb.vmware.com/kb/1000125 ) but it does not /quite/ work for us. All our LM objects are in a particular cluster, named 'Lab Manager'. We have some long-running VMs now from our QA department, so we can't easily specify a date to purge from, which is why this script isn't quite it for us.

Is there a way to purge all non-running VMs in a named cluster from the VCDB? I think this is much closer to what we need than the stock script in KB 1000125.

0 Kudos
3 Replies
kjb007
Immortal
Immortal

Have you looked to see which tables are the largest? Typically, the stats tables are what get fairly large, and what bloats the vc db more than anything else. Edit your vc settings, and make sure your statistics collection is as low as needed, so as to keep your vc db as small as possible. If you don't need the historical stats, purge those tables. If you're using SQL server, go into sql server, and shrink your db, as sometimes the objects are cleared from the tables but not from the disk files making up the db.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
jschlach
Enthusiast
Enthusiast

Our stats collection is at level 2. Between LM and production VMs, we should have around 300 VMs total. So our VCDB should be much smaller. Yesterday we upgraded from 2.0.2 to 2.5 and the VCDB is now 11GB in size!

0 Kudos
kjb007
Immortal
Immortal

How long have you been collecting data? For 300 VM's, 11 GB is not unreasonable. Again, I would try to shrink the db to make sure references to old objects are no longer sitting around. If you don't need the performance stats, I would truncate those tables as well.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos