Automation

 View Only
Expand all | Collapse all

SVMotion from one DS cluster to another DS cluster

  • 1.  SVMotion from one DS cluster to another DS cluster

    Posted Aug 15, 2023 04:11 PM

     

    Good Day !!
    I have a requirement for VMs to be svmotioned from one Datastore cluster to another DS cluster. First DS cluster has around 800+ VMs with different in sizes, First Job would be

    1. Check the cluster which has less than 500GB VMs 
    2. Check the VMs has any RDMs connected
    3. Check the VMs for any affinity or anti-affinity rules

    After all above conditions met VM will svmotion to another datastore cluster and after svmotion completed it has to check the free space in datastore cluster which should not cross 80%. if the free space is above 75% it should start the migration and if it is less than 75% it should stop the migration. Eveytime migration completes it should check the free space and again back to next VM for migration.. Can this be scripted.. pls update



  • 2.  RE: SVMotion from one DS cluster to another DS cluster

    Posted Aug 15, 2023 05:18 PM

    Yes



  • 3.  RE: SVMotion from one DS cluster to another DS cluster

    Posted Aug 16, 2023 09:20 AM

    Can you pls provide the script for this



  • 4.  RE: SVMotion from one DS cluster to another DS cluster

    Posted Aug 16, 2023 09:36 AM

    What do you already have?



  • 5.  RE: SVMotion from one DS cluster to another DS cluster

    Posted Aug 16, 2023 02:58 PM

    I have only in bits and pieces, so far 

    Get-DatastoreCluster XXXXX | Get-Datastore | Get-VM | Get-HardDisk | where {$_.StorageFormat -eq 'Thin' -and $_.CapacityGB -le 500} | select @{N='VM';E={$_.Parent}}, Name,Filename,CapacityGB
    $myds = Get-DatastoreCluster -Name newdscluster
    Move-VM -VM 'xxx', 'dld210127020602' -Datastore $myds



  • 6.  RE: SVMotion from one DS cluster to another DS cluster

    Posted Aug 24, 2023 01:39 PM

      could you help me out here !!!