getShareableAndNonSharDatastore.pl

Version 3

    Extract all VMs on non-sharable datastores from vCenter, also allowing granularity at datacenter or cluster level.

     

    Requirements:

    vCenter 2.5.x or 4.0

    ESX(i) 3.5 or 4.0

    vMA 4.0

     

    Sample Execution:

     

    Querying from entire vCenter:

    [vi-admin@scofield ~]$ ./getVMonShareableAndNonSharDatastore.pl --server mauna-loa.primp-industries.com --username primp --type all
    Enter password:
    Datacenter: mauna-loa
            Shared Datastores:
                    Datastore: [http://dlgCore-FC-LUN202.VMstorage2|http://dlgCore-FC-LUN202.VMstorage2] is VMFS with: 58 VMs
                    Datastore: [http://dlgCore-FC-LUN201.VMstorage1|http://dlgCore-FC-LUN201.VMstorage1] is VMFS with: 6 VMs
                    Datastore: [http://dlgCore-FC-LUN200.Templates|http://dlgCore-FC-LUN200.Templates] is VMFS with: 8 VMs
                    Datastore: [http://dlgCore-FC-LUN204.VMstorage4|http://dlgCore-FC-LUN204.VMstorage4] is VMFS with: 23 VMs
                    Datastore: [http://dlgCore-NFS-bigboi.VM-Backups|http://dlgCore-NFS-bigboi.VM-Backups] is NFS with: 3 VMs
                    Datastore: [http://dlgCore-FC-LUN203.VMstorage3|http://dlgCore-FC-LUN203.VMstorage3] is VMFS with: 11 VMs
    
            Non-Shared Datastores:
                    Datastore: [http://esx-1-local-SAS.Storage|http://esx-1-local-SAS.Storage] is VMFS with: 0 VMs
                    Datastore: [http://esx-2-local-SAS.Storage|http://esx-2-local-SAS.Storage] is VMFS with: 0 VMs
    

     

     

    Querying from specific vCenter datacenter:

     

     

    [vi-admin@scofield ~]$ ./getVMonShareableAndNonSharDatastore.pl --server reflex.primp-industries.com --username primp --type datacenter --datacenter Primp   
    Enter password:
    Datacenter: Primp
            Shared Datastores:
                    Datastore: [http://dlgCore-NFS-bigboi.VM-Backups|http://dlgCore-NFS-bigboi.VM-Backups] is NFS with: 4 VMs
    
            Non-Shared Datastores:
                    Datastore: [simplejack-local-storage] is VMFS with: 4 VMs
                            ghettoVCB4i-test-vm-backup
                            ide-vm
                            .......
                    Datastore: [kang-local-storage] is VMFS with: 0 VMs
                    Datastore: [lazarus-local-storage] is VMFS with: 0 VMs
                    Datastore: [http://dlgCore-iSCSI.test|http://dlgCore-iSCSI.test] is VMFS with: 0 VMs
                    Datastore: [http://himalaya-local-SAS.Constellation|http://himalaya-local-SAS.Constellation] is VMFS with: 18 VMs
                            Iaorana
                            .......
                    Datastore: [http://himalaya-local-SAS.Savvio|http://himalaya-local-SAS.Savvio] is VMFS with: 30 VMs
                            Fugue
                            VIMA
                            Rhapsody
                            Oxygen
                            .......
                    Datastore: [himalaya-local-SATA.RE4-GP:Boot] is VMFS with: 0 VMs
                    Datastore: [himalaya-local-SATA.RE4-GP:Storage] is VMFS with: 22 VMs
                            simplejack.primp-industries.com
                            lazarus.primp-industries.com
                            vMA-resize
                            ThinStation-Dev
                            ESX-Kickstart
                            primp-vapp-esx01
                            ubuntu-test
                            .......
                    Datastore: [storage1] is VMFS with: 2 VMs
                            Test-WinXP
                            Test-RHEL
    
    

     

     

    Querying from specific vCenter cluster:

     

     

    [vi-admin@scofield ~]$ ./getVMonShareableAndNonSharDatastore.pl --server reflex.primp-industries.com --username primp --type cluster --cluster PrimpESXi-cluster
    Enter password:
    Cluster: PrimpESXi-cluster
            Shared Datastores:
                    Datastore: [http://dlgCore-NFS-bigboi.VM-Backups|http://dlgCore-NFS-bigboi.VM-Backups] is NFS with: 4 VMs
    
            Non-Shared Datastores:
                    Datastore: [storage1] is VMFS with: 2 VMs
                            Test-WinXP
                            Test-RHEL
                    Datastore: [simplejack-local-storage] is VMFS with: 4 VMs
                            ghettoVCB4i-test-vm-backup
                            ide-vm
                            itorga backuptrigger
                            dnie workstation
                    Datastore: [kang-local-storage] is VMFS with: 0 VMs
                    Datastore: [lazarus-local-storage] is VMFS with: 0 VMs