VMware Cloud Community
miladmeh8
Hot Shot
Hot Shot
Jump to solution

how to get value of das.respectvmvmantiaffinityrules

Hi All,

I need a PowerCLI command to get the information whether the value of this configuration (das.respectvmvmantiaffinityrules) is true or false? i know the command get-advancedconfiguration but  it just shows the current advanced configuration.

I have a vCenter server 6.5 which has been upgraded from 6.0 and it seems when i start to run virtual machines it doesn't respect these rules and sometimes vms located in the same host at first and then with migration it goes to the seprated host.

Thanks

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You could do something like this

Get-Cluster |

Select Name,

    @{N='respectvmvmantiaffinityrules';E={

        $adv = Get-AdvancedSetting -Entity $_ -Name das.respectvmvmantiaffinityrules

        if($adv){[Boolean]$adv.Value}else{$false}

    }}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

You could do something like this

Get-Cluster |

Select Name,

    @{N='respectvmvmantiaffinityrules';E={

        $adv = Get-AdvancedSetting -Entity $_ -Name das.respectvmvmantiaffinityrules

        if($adv){[Boolean]$adv.Value}else{$false}

    }}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos