Automation

 View Only
  • 1.  How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 15, 2019 01:31 PM

    How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Thanks

    Madhu



  • 2.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 15, 2019 01:37 PM

    What do you mean by 'HDD Size'?

    The name and size of the partitions inside the guest OS?

    Or the size of the VMDK attached to the VM?



  • 3.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 18, 2019 04:33 AM

    Hi LucD,

    I am looking for following feilds

    FolderNameIP AddressVM PowerStateOSCPUMemory (GB)Capacity(GB)UsedSpace(GB)FreeSpace(GB)FreeSpace(%)

    I am able to get the details of Powered On VMs but I would like to get the details of Powered Off VMs as well.

    Please help.



  • 4.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 18, 2019 05:16 PM

    Not too sure what you attached there?

    That code does produce information for all VMs, independent of their powerstate.

    Or are you looking for a complete new script to get the info you listed?



  • 5.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 19, 2019 04:31 AM

    Hi LucD,

    I have attached the current script, which I am using. It works fine for VMs which are Powered On but for Powered Off VMs, I am unable to get the HDD (Capacity) as it shows blank (zero)

    Need you help, if attached script can be tweaked to get the details of Powered Off VMs or a new script.



  • 6.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 19, 2019 04:59 AM

    When the VM is powered off for a longer time, that information, which is obtained through the VMware Tools, is not available.

    No solution for VMs that are powered off for a longer time I'm afraid.



  • 7.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 19, 2019 05:38 AM

    Hi LucD,

    I am able to get the HDD Capacity of Powered Off VMs using

    get-vm | Select Name,NumCpu,MemoryGB,UsedSpaceGB

    But How do I get this added to my script, use above code only if the VMs are Powered Off else continue to current code



  • 8.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 19, 2019 05:58 AM

    Those are 2 different measurements, the one under Guest is measured inside the guest OS, the one you just mentioned is measured from outside the guest OS.



  • 9.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 19, 2019 06:16 AM

    For Powered Off, I am good with measured from outside the guest OS



  • 10.  RE: How To get the CPU, Memory and HDD Size from Power Off VMs ?

    Posted Mar 24, 2019 01:14 PM

    Try the attached script.

    When the VM is powered off, instead of the individual guest OS partitions, you will see 'All' in MountPoint column.