PowerCLIGoodies / DRSRule

PowerShell module with support for managing vSphere DRS Rules and Groups
29 stars 9 forks source link

New-DrsVMtoVMHostRule setting affinity correctly? #10

Closed rcooper3 closed 7 years ago

rcooper3 commented 7 years ago

For New-DrsVMtoVMHostRule the -AffineHostGroupName switch seems to set a new rule to be anti-affinity and -AntiAffineHostGroupName is setting it to be affinity?

e.g. New-DrsVMToVMHostRule -Name licencing_windows_vmhostrule -Cluster $cluster -VMGroupName licencing_windows_vmgroup -AntiAffineHostGroupName licencing_windows_hostgroup -whatif What if: Performing the operation "Create AffineVMToVMHost DRS rule 'licencing_windows_vmhostrule'" on target "cluster1".

vs

New-DrsVMToVMHostRule -Name licencing_windows_vmhostrule -Cluster $cluster -VMGroupName licencing_windows_vmgroup -AffineHostGroupName licencing_windows_hostgroup -whatif What if: Performing the operation "Create AntiAffineVMToVMHost DRS rule licencing_windows_vmhostrule'" on target "cluster1".

rcooper3 commented 7 years ago

Appears to only effect whatif results. In practice the command behaves as expected.

mtboren commented 7 years ago

Thanks, @rcooper3, for reporting this issue in the WhatIf and Verbose output. I just made commit 8ace2dcea58272d3bc57e8ef11fd64ba70188c23 that addressed the issue. Next release will include this fix.

Cheers,

Matt