Automation

 View Only
  • 1.  Output VM directory, filenames and sizes

    Posted Jun 09, 2015 05:53 PM

    Hi,

    I am trying to get a listing of all Virtual Machine directories and the file names and the file sizes.

    I have found scripts that would list the machine names and disks (i.e. C, D) of the guest but not the raw files, delta files and their sizes.

    The reason I am trying to get this information is that the disk space on our 8.8 TB volume is constantly lower than I would have thought.

    Any idea's or suggestions would be appreciated.

    Thanks,

    Henry



  • 2.  RE: Output VM directory, filenames and sizes

    Posted Jun 09, 2015 09:02 PM

    Have a look at yadr – A vdisk reporter



  • 3.  RE: Output VM directory, filenames and sizes

    Posted Jun 10, 2015 01:09 PM

    Hi,

    That script does provide some very useful information. Thank you very much for the link.

    I am not proficient at scripting by any stretch of the imagination but the comments on what the lines of the script do are very helpful.

    I am not sure if the results provide all the information with respect as to parent disks (not sure how to describe this but will give it a whirl)

    The environment uses vCloud Director and copies of entire environments of VM's are stored in a catalog. We are using linked clones.

    Information as to how current VM's disks are linked to older VM directories would be useful although I do not know if that is achievable - although I will continue to investigate.

    Thanks for your time and response.

    Henry



  • 4.  RE: Output VM directory, filenames and sizes

    Posted Jun 10, 2015 05:38 PM

    Hi,

    Found that I can get full list of VM's and their directory contents by using:

    dir -Recurse -Path vmstores:\ | select Name, DatastoreFullPath, LastWriteTime and export it it gives me pretty well what I am after - with the exception of the parent disk(s) of the chain.

    Thanks,

    Henry