1 Reply Latest reply on Dec 22, 2015 6:33 PM by justinbennett

    need help in developing powercli script for selecting particular Virtual Machines from particular LUNs and transferring them to another LUNs.

    ajinkyab15 Lurker
      1. I want to develop a script for this one. You can give any suggestions to change.
      2. 1) Firstly, we select the over-provisioned LUNs from the environment. For example, in this particular environment we take ISCSILUN02007, it is over-provisioned to a capacity of 826.64 MB.
      3. Then find out the number of Virtual Machines in that particular LUN. In LUN2007, there are 5 virtual machines.

      LUN

      Total VMs

      VM to transfer

      Provisioned size in MB

      Size after moving in MB

      cluster

      New LUN transfer

      ISCSILUN02007

      WKNGEN1AGW01v-oam

      WKNGEN1AGW01v-oam,

      339,095

      1. 286.983

      API-GW

      ISCSILUN04001

      WKNGEN1AMN01v-oam

       

      135301

      API-GW

       

      WKNGEN1PCC01v-oam

      WKNGEN1PCC01v-oam

      108662

      PCRF

      ISCSILUN04001

      WKNGEN1PPS01v-oam

      WKNGEN1PPS01v-oam

      110706

      PCRF

      ISCSILUN04002

      WKNGEN1GWY04v2-oam

       

      151,682

      PGW

       

       

       

      1. Find the maximum capacity VMs and similar application VMs from the LUN. Bring the original capacity of LUN to 60-70%. Accordingly select the possible VMs and move to new datastore. As in the above example, among the 5 VMs we select the WKNGEN1AGW01v-oam VM as it is occupying biggest space. It has a capacity of 339.095 MB. We can’t select WKNGEN1GWY04v2-oam VM as it is just 151.682 MB and running different application. Among the remaining three, we select both WKNGEN1PCC01v-oam and WKNGEN1PPS01v-oam as they are running the similar application. And the remaining two VMs bring down the capacity to 286.983MB.
      2. Therefore, select the three VMs and transfer them to datastore. WKNGEN1AGW01v-oam and WKNGEN1PCC01v-oam is transferred to ISCSILUN04001. They are running different applications so we can keep them in one LUN. WKNGEN1PPS01v-oam is moved to ISCSILUN04002. As it runs the PCRF service similar to WKNGEN1PCC01v-oam VM.
      3. First priority is given to LUN capacity then to separate applications. If we transfer any other VM with different application, then the LUN capacity exceeds more that 70%. Thus we kept two VMs with same service together.