how to do Datastore Housekeeping

Posted on 2009-02-09
Last Modified: 2012-05-06

our Environemt consists of about 80 ESX Hosts and has more than 20 Datastores presented with each one around 1TB Capacity.
Multiple people have access and I think that over time there have been a lot of VM's deleted from VC but not from the actual Datastores. This causes obviously a lot of space wasted.

Does anyone know a tool/programm which can help us identify data (unused VM's) on Datastores and therefore give us the ability to delete them and free up space again?

It is quiet a hassle to do this tedious task manually and since we have multiple people with access to VC and capability to create VM's i would like to know if there is a nice and simple house keeping tool which can help with keeping the Datastores clean.


Question by:mimalu
    LVL 8

    Assisted Solution

    If the guest sessions are deleted in the underlying disk you will see them as orphaned.
    If the sessions are deleted via the VC the VC will reflect this.
    If you are trying to clean up the SQL DB's and remove unnecessary data there are some unsupported rouitines  where you purge specific tables of redundant logged activity
    I can't remember what these tables are but will identify them tomorrow and post.
    LVL 21

    Assisted Solution

    Well, a way to check to see if the VM is orphaned / not used would be to look at the timestamps for the VMX/VMDK files. If there last modified/accessed date is more than a month (or whatever your limit is) than I guess you can safely assumed they are no longer used.
    Now as to how to do that across 80 VMFS partitions ... maybe somebody can write a powershell/perl script to find this out?
    LVL 42

    Accepted Solution

    I would look at something like Vizioncore's VCharter, the performance monitoring and tracking is amazing.  You can run multiple reports both canned and self created.  The best feature that I found for large environments is the chargeback where you chargeback each VM to a specific environment.  This reduces the vmware sprawl quite a bit when they have to pay for VM cpu/memory or per VM.

    In general you can run a report for non active VMs and other reports that will assist in clean-up.  Vizioncore's VOptimizer also has some great features for this.

    My $.02

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    VMware disconnecting 10 71
    ESXi unable to add blank new local Server LUN ? 12 56
    Windows VM with Multiple vmdks. 3 53
    vm nic duplex 1 33
    One of the new features of a version 7.0 or later virtual machine, supported in VMware vSphere 4.1, 5.0 or the VMware vSphere Hypervisor ESXi 4.1, ESXi 5.0 often overlooked by VMware Administrators is the ability to add and connect USB devices conne…
    VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
    Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
    Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now